[sqlalchemy] Can expire_on_commit be made to apply at an object level (instead of everything in the session)?

2011-01-13 Thread Russ
On Wednesday, January 12, 2011 2:16:00 PM UTC-5, Michael Bayer wrote: see expire_on_commit=False as well as Session.commit() for further detail: http://www.sqlalchemy.org/docs/orm/session.html#committing http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.session.Session.commit To

Re: [sqlalchemy] Can expire_on_commit be made to apply at an object level (instead of everything in the session)?

2011-01-13 Thread Michael Bayer
On Jan 13, 2011, at 10:18 PM, Russ wrote: On Wednesday, January 12, 2011 2:16:00 PM UTC-5, Michael Bayer wrote: see expire_on_commit=False as well as Session.commit() for further detail: http://www.sqlalchemy.org/docs/orm/session.html#committing

Re: [sqlalchemy] Can expire_on_commit be made to apply at an object level (instead of everything in the session)?

2011-01-13 Thread Russ
On Thursday, January 13, 2011 10:29:10 PM UTC-5, Michael Bayer wrote: So you're looking to do a write-through cache here, i.e. write the DB, then write the value straight to the cache. I think if you were to say session.flush(), which emits the SQL, then detach all the objects using