Re: [sqlalchemy] Re: using scoped_session in serial mode as well as parallel (multi-threaded) mode

2010-08-12 Thread Michael Bayer
On Aug 12, 2010, at 9:25 AM, Faheem Mitha wrote: Hi Mike, Thanks for the response, but I don't follow. When you say multiple threads are hitting the session you have above, which session are you referring to? There is more than one object above that could be called a session. Ie. I

Re: [sqlalchemy] Re: using scoped_session in serial mode as well as parallel (multi-threaded) mode

2010-08-12 Thread Michael Bayer
On Aug 12, 2010, at 11:47 AM, Faheem Mitha wrote: On Thu, 12 Aug 2010 09:44:04 -0400, Michael Bayer mike...@zzzcomputing.com wrote: On Aug 12, 2010, at 9:25 AM, Faheem Mitha wrote: Hi Mike, Thanks for the response, but I don't follow. When you say multiple threads are hitting

Re: [sqlalchemy] Re: using scoped_session in serial mode as well as parallel (multi-threaded) mode

2010-08-12 Thread Michael Bayer
On Aug 12, 2010, at 2:41 PM, Faheem Mitha wrote: objects among threads, they reference their owning session in order to load additional state. If you pass objects between threads you should merge() them into the current thread's session first, then use that result. I see. That's very