Print Page | Close Window

Any simple way to force the XML Serialization of the complete object graph?

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3157
Printed Date: 12-Apr-2026 at 10:35pm


Topic: Any simple way to force the XML Serialization of the complete object graph?
Posted By: Frederic
Subject: Any simple way to force the XML Serialization of the complete object graph?
Date Posted: 14-Dec-2011 at 12:49pm
Good afternoon,

I have read the short section regarding "XML Serialization of Business Objects" of "DevForce 2010 Developpers Guide". so I understand the following statement:

Without some mechanism to control the depth of the graph, the serialization of a single entity might result in hundreds or even thousands of related entities being serialized.

Nethertheless, we want to use the serialization mechanism to perform an "entity" Cut and Paste functions, so we need a simple way to include, during the serialization process, the complete object graph of an entity. Do you have any simple suggestion?

Thanks for your help.

Frédéric



Replies:
Posted By: DenisK
Date Posted: 14-Dec-2011 at 1:18pm
Hi Frederic;

As the guide says, it will only serialize objects in the EntityManager's cache so as long as you have the complete object graph of an entity in the cache, the serialization process will include the full graph.

Just an additional note. I'm guessing you're reading the PDF version of the developer's guide. That is no longer current. We now maintain DevForce 2010 documentation on drc.ideablade.com

Here's a link discussing the same topic on the DRC (DevForce Resource Center).  http://drc.ideablade.com/xwiki/bin/view/Documentation/xml-serialization - http://drc.ideablade.com/xwiki/bin/view/Documentation/xml-serialization



Print Page | Close Window