Refresh hits the db - this is why it is problematic to use. Object can be deleted from db concurrently. We have a long (flaming) discussion on this topic (restore object state). See here http://groups.google.com.ua/group/nhusers/browse_thread/thread/9ff190a302d37 c35
Are you writing a WinForms app? -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of darren Sent: Monday, June 22, 2009 6:39 PM To: nhusers Subject: [nhusers] Re: Transaction rollback question Refresh works but from what I can tell Refresh only restores a single object. If it does I'd have to enumerate all the objects in the session and refresh them manually. It also hits the database again; aren't the original values already cached in the session? On Jun 19, 8:13 pm, Fabio Maulo <[email protected]> wrote: > You are doing something wrong in somewhere else. My advice is not hope that > is a bug in NH. > If for "restore data" you mean restore old data of your in memory objects > what you should do, after rollback, is a Refresh > > 2009/6/19 darren <[email protected]> > > > > > If I load data into a session, start a transaction, make some changes, > > then rollback the transaction why is the session data not restored to > > the state it was in when the transaction started? > > > I'm trying to figure out how implement cancel edit behaviour and > > haven't been able to find any examples. > > -- > Fabio Maulo __________ Information from ESET Smart Security, version of virus signature database 4174 (20090620) __________ The message was checked by ESET Smart Security. http://www.esetnod32.ru __________ Information from ESET Smart Security, version of virus signature database 4174 (20090620) __________ The message was checked by ESET Smart Security. http://www.esetnod32.ru --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
