]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
dont use assignmapper.flush()
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Apr 2007 20:50:15 +0000 (20:50 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Apr 2007 20:50:15 +0000 (20:50 +0000)
doc/build/content/plugins.txt

index 5e2e20ea17e78a3ef019c3d537006242b3cdd248..5f23e3d64619237677b02669af6d932e89f4c22d 100644 (file)
@@ -271,24 +271,11 @@ To continue the `MyClass` example:
     # delete it
     result.delete()
     
-    # commit the change
-    result.flush()
-
-It should be noted that the `flush()` method on the instance need not be called.  You're probably better off calling `flush()` on the actual session, so that all changes are properly written to the database simultaneously:
-
-    {python}
-    # create a MyClass.
-    mc = MyClass()
-
-    # load some MyClass objects
-    result = MyClass.select(MyClass.c.name=='bar')
-
-    # delete one of them
-    result[1].delete()
-
     # commit all changes
     ctx.current.flush()
 
+**Note:** : while the `flush()` method is also available on individual object instances, the instance-local flush() **does not flush dependent objects**.  For this reason this method may be removed in a future release and replaced with a more explicit version.
+
 ### associationproxy
 
 **Author:** Mike Bayer<br/>