]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
query.delete(False) is not so bad
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 8 Jan 2009 15:33:34 +0000 (15:33 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 8 Jan 2009 15:33:34 +0000 (15:33 +0000)
lib/sqlalchemy/orm/query.py

index c5349e052e2cd573f450393d75602163be5bcfc0..03030f8b04c7e7a3a7003e8e55c4c9bacf9debc1 100644 (file)
@@ -1335,10 +1335,11 @@ class Query(object):
         session. Valid values are:
 
         False
-          don't synchronize the session. Use this when you don't need to use the
-          session after the delete or you can be sure that none of the matched objects
-          are in the session. The behavior of deleted objects still in the session is
-          undefined.
+          don't synchronize the session. This option is the most efficient and is reliable
+          once the session is expired, which typically occurs after a commit().   Before
+          the expiration, objects may still remain in the session which were in fact deleted
+          which can lead to confusing results if they are accessed via get() or already
+          loaded collections.
 
         'fetch'
           performs a select query before the delete to find objects that are matched