Open CrossSlide opened 5 years ago
@CrossSlide , The third Csla Object that you mentioned, is it a 'using' relationship or an intergraph reference?
Not sure what 'using" is or means. It's just a normal CSLA property in the class that I set when needed. Thanks
@CrossSlide , I would recommend reading p-35, 36 in 'Creating Business objects' book. Rocky has excellent recommendations on when /how to use 'using' vs Intergraph reference.
Will do! Thanks
Ok, yeah it's one of those things you read in the beginning and tell yourself to keep in mind but then don't think about when the situation comes up for the first time.
Thanks @Chicagoan2016 !
To answer your original question, if you don't want this third Bo to make your main BO dirty, you should be able to override the IsDirty on the root BO, and compose the dirty state yourself; eg.
public override bool IsDirty => IsSelfDirty || Child1.IsDirty || Child2.IsDirty;
Then your graph will ignore the dirty state of Child3.
Thanks @ajj7060, that's a technique I'll keep in mind.
I have a BO with two child properties where I set RelationshipTypes.Child. I have a third CSLA object as a property that does not set the child relationship. However, if this non-child property IsDirty then my BO shows IsDirty = true but IsSelfDirty = false even though I set it with the LoadProperty().
Is this expected behavior? It was very hard to track down the cause of the IsDirty. I didn’t think it would do this because it is not a child object. Anyway to prevent this behavior?
Version and Platform CSLA version: 6.3 OS: Windows Platform: WPF