I found some forum entries and finaly a BugTracker entry about supporting NotUndoable and NonSerizalized managed properites. Is any chance that it will make it in to Csla4.0? If the answer is no, is there any recommended workaround that can be used inbetween?
No, this won't be in CSLA 4. Right now the workaround is to use private backing fields for those properties.
Solving the problem turns out to be complex, because it could force the field manager to maintain 4 lists of values:
I'm not sure I want to accept the overhead of maintaining four lists, and serializing two of them sometimes but not other times, and I just didn't have time to perform such major surgery to the field manager and serialization infrastructure for CSLA 4.
Might it be possible to at least "simulate" NotUndoable by tinkering with the FieldManager undo implementation?
At least at some level, the only difference between "should undo" and "should not undo" is that if UndoChanges is called, the current value of the property should be discarded in favor of th saved state for an undoable property and not discarded otherwise, so I'd think you could perhaps leave everything the same except ignore NotUndoable properties in the FieldManager when restoring the previous state.
Maybe this is a gross oversimplification, but it might work...
That's true, NotUndoable probably isn't so bad. NonSerialized is the harder one.
Copyright (c) Marimer LLC