CancelChanges

May 4, 2015 at 12:51 AM
When i call the session.CancelChanges all the fields are reverted back to the original values but the propertychanged notification is only fired to the entity fields, if i have a related entity that has changed it is reverted back but the propertychanged notification is not fired

Regards
May 4, 2015 at 12:55 AM
Well, I guess it is expected behavior, seems logical to me. Canceling changes is not real change of value....
But... I can see how it can be a problem, with binding to UI in WPF... on the other hand, shouldn't you just fire refresh on the entire Form in this case?
May 4, 2015 at 1:05 AM
I can refresh the UI but it means tha all controls will be reset and repainted on the screen, if the entity uses the property changed notification changed event only controls tha are binded to the changed fields are refreshed, much faster.

It is was only a sugestion, not a requirment for this excelent framework :)

Regards
May 4, 2015 at 1:47 AM
all right, I will look into this. Just a bit concerned how logical or confusing would be this behavior, if I change it. Let me look into this. Maybe an optional parameter to CancelChanges would make it clear
May 4, 2015 at 1:59 AM
Good Idea.

Any new stuff comming soon ? :)

Regards
May 4, 2015 at 7:23 AM
Edited May 4, 2015 at 7:24 AM
yeah, constantly working on new stuff. Had been working on implementing Views, but it appeared a bit no more complex than I thought initially. Then got side-tracked into some other stuff - WebApi related. Will probably push it soon, almost ready. Some cool new facilities, although not so useful for you, for Windows apps in general. Then back to Views
Jun 22, 2015 at 7:17 AM
Looked at cancel changes, firing PropertyChanged event. Don't understand what's the problem. If EntA has property referencing EntB (EntA.RefToB -> EntB), and we cancel changes - for all changed fields in both entities event is fired. If while editing you changed ref property, it should fire too (on ref property). But if you did not change reference, but only fields on target property, the ref property is not signaled as changed.
I think it's logical. Isn't it?
Roman