[sqlalchemy] Re: In Turbogears, using the same transaction for mapped objects and direct operations

2007-06-07 Thread Sanjay
So, cherrypy.request.sa_transaction.connection should work. I had tries that. But it says Exceptions :'function' object has no attribute 'execute' Don't know why. Sanjay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: In Turbogears, using the same transaction for mapped objects and direct operations

2007-06-06 Thread Sanjay
conn = session.context.get_current().connection(SomeMappedClass) conn.execute(...) Thanks! It is exactly what I needed. BTW, the session transaction is stored in cherrypy.request.sa_transaction. Does this help simplify the statements? thanks again, Sanjay

[sqlalchemy] Re: In Turbogears, using the same transaction for mapped objects and direct operations

2007-06-06 Thread Marco Mariani
Sanjay ha scritto: BTW, the session transaction is stored in cherrypy.request.sa_transaction. Yes, but it's been added recently. Does this help simplify the statements? Transaction instances have a connection() property. So, cherrypy.request.sa_transaction.connection should work.

[sqlalchemy] Re: In Turbogears, using the same transaction for mapped objects and direct operations

2007-06-05 Thread Marco Mariani
Sanjay ha scritto: Need help on how to do it. Being a turbogears application where db entities like metadata and session are imported rather than created by me, I am confused and could not successfully implement the pattern provided in the docs. I'm sure there are cleaner ways, but this

[sqlalchemy] Re: In Turbogears, using the same transaction for mapped objects and direct operations

2007-06-05 Thread Huy Do
Marco Mariani wrote: Sanjay ha scritto: Need help on how to do it. Being a turbogears application where db entities like metadata and session are imported rather than created by me, I am confused and could not successfully implement the pattern provided in the docs. I'm sure