On Wednesday, January 12, 2011 2:16:00 PM UTC-5, Michael Bayer wrote:
Suppose a concurrent thread or process deleted your row in a new
transaction and committed it, or didn't even commit yet hence locked the
row, in between the time you said commit() and later attempted to access the
Check this code out:
http://python.pastebin.com/kMV611z7
In there I generate an object instance, add it to a session, then commit it.
I then try and access the id attribute (autoincrementing PK), which results
in SQL being emitted... but the emitted SQL has the id value in it already!
Is there
Suppose a concurrent thread or process deleted your row in a new transaction
and committed it, or didn't even commit yet hence locked the row, in between
the time you said commit() and later attempted to access the attributes of the
row. That's the rationale in a nutshell.
see