On Jan 30, 3:02 pm, "Michael Bayer" <[EMAIL PROTECTED]> wrote: > On Jan 30, 4:12 pm, "Ian" <[EMAIL PROTECTED]> wrote: > > > without saving, so flushes occur only at the user's request. It's not > > clear to me how one could easily discard the session and create a new > > one in this context. Doing so would probably involve keeping track of > > all the unsaved changes myself, which would be throwing away much of > > the value of the session object. > > the changed state on your objects is stored in an attribute on the > object itself called "_state" (and actually, its not the "changes" as > much as "what was loaded from the database"). you can freely move > instances from one session to the next (using either save_or_update() > or merge()) and the changes will be maintained.
Okay, that doesn't sound so bad. It looks like I would still have to track deletions myself, but that shouldn't be too much extra work. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---