Out of memory exception serializing generated DTO objects

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
temelvin
Posts: 7
Joined: Fri 31 Jan 2014 03:01

Out of memory exception serializing generated DTO objects

Post by temelvin » Sun 02 Feb 2014 03:55

I am receiving an out of memory exception when serializing DTO objects that were generated by the DTO template. This is being caused by the WCF [DataMember] attributes being applied to navigation properties that in turn down the chain re-reference the original DTO creating a closed loop. Is there a way to change the DTO template to avoid this behavior ? I noticed that some of the other templates have options to not mark navigation properties with WCF attributes.

I can simply remove the [DataMember] attribute from navigation properties in the generated classes and the problem goes away. However I want to avoid them being re-populated when the code is regenerated.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Out of memory exception serializing generated DTO objects

Post by Shalex » Mon 03 Feb 2014 15:27

Thank you for your report. We will notify you when the property WCF DataMember Attribute on Navigation Properties is implemented for the Data Transfer Object template.

As a workaround, please set the DTO Classes In Associations property to False.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Out of memory exception serializing generated DTO objects

Post by Shalex » Wed 12 Feb 2014 11:38

The "WCF DataMember Attribute on Navigation Properties" property is added to the Data Transfer Object template for pointing the end (-s) where the attribute should be generated. We will notify you when the corresponding build of dotConnect for Oracle is available for download.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Out of memory exception serializing generated DTO objects

Post by Shalex » Thu 13 Feb 2014 16:26

New build of dotConnect for Oracle 8.2.100 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=28938.

Post Reply