From 075f44b10f6c83d4438adf7eb22f056109bf7f86 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 23 Apr 2007 20:50:15 +0000 Subject: [PATCH] dont use assignmapper.flush() --- doc/build/content/plugins.txt | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/doc/build/content/plugins.txt b/doc/build/content/plugins.txt index 5e2e20ea17..5f23e3d646 100644 --- a/doc/build/content/plugins.txt +++ b/doc/build/content/plugins.txt @@ -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
-- 2.47.2