I am encountering a minor issue after upgrading our classes to CSLA 4.0 (with some revisions). Our previous version's Fetch routine loaded all field managers using LoadProperty. I have modified the Fetch routine as follows:
Field1 = dr.GetString("Id")
ChildCollection = ChildObject.GetChildObject(Field1)
Prior to the ChildCollection assignment the isDirty property is false. If I change the ChildCollection assigment to utilize the LoadProperty the isDirty property is false. However after the assignment above the isDirty object for the property is true.
I've manually evaluated each Child Object in the collection's isDirty value to be false as well.
Any suggestions? I could keep the LoadProperty or use the MarkOld method but wanted to ensure I have not overlooked anything.
I just solved it. Just in case anyone encounters a similar issue, check carefully your properties. It appears the childcollection property was using SetProperty instead of LoadProperty which caused the issue.
Copyright (c) Marimer LLC