Hi Sergey thanks for your answers.
Quote:
Well, if possible, you should throw away the entities if a transaction fails, just let them be garbage-collected. Of course, sometimes you can't.
Yes I know that is "standard procedure" ;) in java web based aplication with Hibernate... but with .NET specially in WindowsForms... the objects are binded directly to de UI... so, for example if I have a "create new customer" window, and the user forgot to add the "Last Name" of the customer, I do not want to validate that with UI code (because I might need to interact with the Customer object in another place and I want my "Last Name is required" rule to be enforced every time I try to save a Customer... so I do it with validation in the PONO level... and after the validation says "You need LastName" and indicates that to the UI thanks to my implementation of IDataErrorInfo in my PONO... I can not discard my object... (if I discard it the controls in my screen would go blank and I would force the user to capture everything again (Mmmm... I think we need more documentation on how to properly use NHibernate on WindowForms... and perhaps some extensions to make it easier)
Quote:
You can't just set the version to null, you have to restore it to its original value, so you will have to also store away the original value in your interceptor.
I agree... I think that since I am using and Int32 that it is automatically incremented by hibernate... perhaps all I have to do is "decrease" it (and if its value is 0 then "decrease it" into null... what do you think?