Hi,

In a turbogears application that I am developing, in a single
transaction, I need to delete certain records of a table, and update
another table. the code is something like:

from sqlalchemy import *
from turbogears import metadata, session
.
.
.
document_tbl.delete(document_tbl.c.doc_id.in_(*doc_ids)).execute()
website.used_bytes -= size_of_deleted_documents # website is a mapped
object.
.
.

Problem is that, the delete statement runs in its own transaction, and
not in the same transaction in which the second statement runs.

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.

thanks,
Sanjay


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to