This has nothing todo with NH. You may implement IEditableObject to avoid that.
Am 14.03.2013 um 15:07 schrieb Atilla İlhan KARTAL <[email protected]>: > Dear All; > > We are using NHibernate in a C# Winform application. But we are facing a > problem: > > 1- We are listing all the users (records) into a grid > 2- When doubled clicked on a user record, we are opening another form in > order to edit user properties > 3- We are binding properties to text boxes and other controls using > BindingSource component > 4- When a property is changed in a textbox, the related record in the grid is > changed, too, even if object is not saved explicitly. This is our problem > because we don't want the changes in edit form to be reflected on the grid > immediately. > > What we have tried till now: > 1- When transferring object from grid to edit form, we are not passing the > object itself but a copy of it using Session.Load<M>(id); command > 2- We are evicting the returned object using Session.Evict(o) command > > Session Creation > 1- When the application starts, Session is created and it stays alive during > application (Singleton pattern) > 2- Session.FlushMode = FlushMode.Never; > > > How can we fix this problem? > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/nhusers?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
