From: Mike Bayer Date: Mon, 3 Apr 2006 05:50:34 +0000 (+0000) Subject: still tryin to clarify.... X-Git-Tag: rel_0_1_6~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3f0f8dc13c3dee2d879a3fac327aedf7318b7a5;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git still tryin to clarify.... --- diff --git a/doc/build/content/unitofwork.myt b/doc/build/content/unitofwork.myt index 97778849ed..fd7c781e62 100644 --- a/doc/build/content/unitofwork.myt +++ b/doc/build/content/unitofwork.myt @@ -200,7 +200,10 @@

This second form of commit should be used more carefully as it will not necessarily locate other dependent objects within the session, whose database representation may have foreign constraint relationships with the objects being operated upon.

<&|doclib.myt:item, name="whatis", description="What Commit is, and Isn't" &> -

The purpose of the Commit operation is to instruct the Unit of Work to analyze its lists of modified objects, assemble them into a dependency graph, fire off the appopriate INSERT, UPDATE, and DELETE statements via the mappers related to those objects, and to synchronize column-based object attributes that correspond directly to updated/inserted database columns. And thats it. It does not affect any relation-based object attributes, that is attributes that reference other objects or lists of other objects, in any way. A brief list of what will not happen includes:

+

The purpose of the Commit operation, as defined by the objectstore package, is to instruct the Unit of Work to analyze its lists of modified objects, assemble them into a dependency graph, fire off the appopriate INSERT, UPDATE, and DELETE statements via the mappers related to those objects, and to synchronize column-based object attributes that correspond directly to updated/inserted database columns.

+

Its important to note that the objectstore.get_session().commit() operation is not the same as the commit() operation on SQLEngine. A SQLEngine, described in <&formatting.myt:link, path="database"&>, has its own begin and commit statements which deal directly with transactions opened on DBAPI connections. While the session.commit() makes use of these calls in order to issue its own SQL within a database transaction, it is only dealing with "committing" its own in-memory changes and only has an indirect relationship with database connection objects. +

+

The session.commit() operation also does not affect any relation-based object attributes, that is attributes that reference other objects or lists of other objects, in any way. A brief list of what will not happen includes: