[sqlalchemy] Re: permanent objects and sessions

2007-07-28 Thread Michael Bayer
your best option is probably to keep the objects in a session that's specifically for the global objects. Most important is that if you are using multiple threads, you never call flush() on this session. With regards to threadsafety in this case, as long as the session is not used for a flush()

[sqlalchemy] Re: permanent objects and sessions

2007-07-28 Thread michael
On Sat, 28 Jul 2007 14:36:45 - Michael Bayer [EMAIL PROTECTED] wrote: your best option is probably to keep the objects in a session that's specifically for the global objects. Most important is that if you are using multiple threads, you never call flush() on this session. With

[sqlalchemy] Re: permanent objects and sessions

2007-07-28 Thread MuTPu4
On Jul 28, 5:36 pm, Michael Bayer [EMAIL PROTECTED] wrote: your best option is probably to keep the objects in a session that's specifically for the global objects. Most important is that if you are using multiple threads, you never call flush() on this session. With regards to threadsafety

[sqlalchemy] Re: permanent objects and sessions

2007-07-28 Thread MuTPu4
On Jul 28, 11:08 pm, Michael Bayer [EMAIL PROTECTED] wrote: theres nothing at all wrong with the above; the only adjustments Id make are to a. leave a global session open for your directory.root, and b. remove all cascade rules from the parent relation (in this case using

[sqlalchemy] Re: permanent objects and sessions

2007-07-28 Thread Michael Bayer
On Jul 28, 2007, at 8:46 PM, MuTPu4 wrote: On Jul 28, 11:08 pm, Michael Bayer [EMAIL PROTECTED] wrote: theres nothing at all wrong with the above; the only adjustments Id make are to a. leave a global session open for your directory.root, and b. remove all cascade rules from the parent