[sqlalchemy] Re: Bit strange - no expunge required?

2007-04-12 Thread Arun Kumar PG
I think SessionContext makes senses especially for architecture involving multiple layers like mine where manager - DAO interaction happens. Thx Michael. On 4/12/07, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 11, 2007, at 11:15 PM, Arun Kumar PG wrote: Hi Michael, So how can I

[sqlalchemy] Re: Bit strange - no expunge required?

2007-04-11 Thread Michael Bayer
On Apr 11, 2007, at 11:45 AM, Arun Kumar PG wrote: Hi Guys, I am having two layers in my application: Manager and DAO. DAO deals with ORM and manager simply calls method on DAO. This is what I am doing in manager manager: rs = dao.getResults (params) obj = rs[0] some logic.

[sqlalchemy] Re: Bit strange - no expunge required?

2007-04-11 Thread Arun Kumar PG
Hi Michael, So how can I prevent this as I can't access the lazyload attributes in my manager class once I get the result set from DAO as i get no parent session/contextual session exists exception. should I maintain a reference to the session object in the DAO class so that it is not garbage