It looks like something like "Rolling back identifiers" in JIRA, am i right?

Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike




On Mon, Jun 22, 2009 at 11:34 PM, darren <[email protected]> wrote:

>
> When I call session.Restore(obj) it is reloading the objects from the
> database (at least that is what the sql trace shows)
> I want to be able to reload but avoid going to the database as the
> entities can be very large.
>
> Yes I want to set all the entities in a session to the state they were
> in when begin transaction was called.  I need to be able to create
> restore points.
>
> On Jun 22, 12:09 pm, Fabio Maulo <[email protected]> wrote:
> > Darren,Are you looking for session.Restore(object) ?
> > Where for "Restore" I mean set all values to the first loaded (without
> hit
> > db again) and the cascade should work with entities, in the graph, where
> the
> > value include "save-update".
> > That is what you are looking for ?
> >
> > 2009/6/22 darren <[email protected]>
> >
> >
> >
> >
> >
> > > So in memory transactions are not available?  That will be a big issue
> > > since the in memory footprint for our can be 100MB+ and to create an
> > > entire copy in memory is wasteful but to reread it from the database
> > > is worse.
> >
> > > I guess I could hook into the pre EventListeners and build up my own
> > > list of changed entities then revert only the items in my list.
> >
> > > On Jun 22, 9:04 am, darren <[email protected]> wrote:
> > > > I'll have a read through that thread.
> >
> > > > I'm targeting WPF, Silverlight, and a web service.
> >
> > > > On Jun 22, 8:45 am, "Yevhen Bobrov" <[email protected]> wrote:
> >
> > > > > 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 herehttp://
> > > groups.google.com.ua/group/nhusers/browse_thread/thread/9ff190...
> > > > > 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
> >
> > --
> > Fabio Maulo
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to