WriteXml/ReadXml with XmlFormatAspect.Compact

Posts   
 
    
peskyneil
User
Posts: 8
Joined: 06-Jan-2004
# Posted on: 17-May-2005 03:29:41   

Correct me if I'm wrong, but my understanding of the use of the Compact Format in WriteXml/ReadXml results in the default entity factories being used when de-persisting from Xml (I've done a few quick tests and this appears to be the case and remember reading about the limitation somewhere).

Anyway I was wondering if it would be possible to get the ReadXml to make use of the TypeContained (if present) when de-persisiting from Compact XML, this should result in the de-peristed object graph more closely matching the graph before persistance for cases where inheritence is being used (after all we already adorn EntityCollection properties on derived classes with this attribute).

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 17-May-2005 12:12:49   

It will generate the entityfactory set for the collection when the Xml is produced. This means that if you add the attribute to a property, you should set the collection returned by that property to the proper entity factory as well. (see the derived entity templates for adapter).

The attribute is for databinding purposes, so when an empty collection is bound (customer.orders), the columns/fields of the derived entity in orders are shown.

Frans Bouma | Lead developer LLBLGen Pro