This project has moved. For the latest updates, please go here.

Problem to serialize object with lists

Oct 8, 2012 at 8:11 AM

Hello all,

I have a problem to serializing a class with lists/collection. When I try to convert the collections I got an error: Can't get value from AdditionalItems, when loading the collection before serializing it works fine but I don't want to load the collection manually. Here some code snippets


    public class Costs: BasicPersistentObject, IPropertyValueValidator
        #region field
        EnumType _enumtype;
        public EnumType BlendType
            get { return _enumtype; }
            set { SetPropertyValue("EnumType ", ref _enumtype, value); }

        public XPCollection AdditionalItems
                return GetCollection("AdditionalItems");

//It fails here


When I use object.AdditionalItems.load() serializing works fine, is it possible to load this collections automatic upon serializing?