[sqlalchemy] Re: Am I really doing this right?

2010-06-03 Thread Nick Retallack
Pretend I bound that metadata and session to an engine at some point... On Jun 3, 12:59 pm, Nick Retallack wrote: > On Jun 3, 8:53 am, Michael Bayer wrote: > > > > Is it a common practice to pass the current session into the > > > constructor of an ORM model?   > > > no.   The session consumes y

[sqlalchemy] Re: Am I really doing this right?

2010-06-03 Thread Nick Retallack
On Jun 3, 8:53 am, Michael Bayer wrote: > > Is it a common practice to pass the current session into the > > constructor of an ORM model?   > > no.   The session consumes your objects, not the other way around.  An object > can always get its current session via object_session(self). > > > At thi