- attached test_sql.py
no autoflush before table.delete()
Issue #2550
resolved
See the attached script for a test case, output on my system (64 bit linux, custom built python 2.7.3, SA 0.7.8) is:
spaans@spaans64:~/projects/rgs/python$ LD_LIBRARY_PATH=/opt/python/lib bin/python test_sql.py Testing with SA '0.7.8' expect 0, got 1 expect 0, got 0 expect 1, got 1 expect 0, got 0
Comments (3)
-
reporter -
repo owner - changed status to wontfix
Autoflush is not part of the contract of the
execute()
method, which instead represents the means of going "outside" of the usual ORM mechanics to do something with the database more directly. For a plain table delete within the scope of the ORM try using query(Test).delete() instead. -
repo owner here's a doc note I just added: http://sqlalchemy.readthedocs.org/en/rel_0_7/orm/session.html#sqlalchemy.orm.session.Session.execute
- Log in to comment
testcase for failing autoflush before delete