Re: [Twisted-Python] [sqlalchemy] Re: SQLAlchemy, Twisted, and sAsync

King Simon-NFHD78 wrote:
The solution to this is either to eager-load all the attributes you think you are going to need before handing the instance off to another thread (difficult), or (probably better) to detach (expunge) the instance from thread A's session.
Are there any recommended code examples around for doing this? Once detatched, are these objects (I'm guessing for most people they'll be instances of declaratively mapped models) pickleable?
Thread B should then merge the object into its own session (using the load=False flag so that it doesn't needlessly requery the database).
Good code examples of this around too? cheers Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
participants (1)
-
Chris Withers