diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-04-06 18:28:40 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-04-06 18:28:40 -0400 |
commit | afba8ab659f2c9ee7084358b6db5f61920b1691c (patch) | |
tree | 00e01f0ec976137acd63d2d2b8461da73bfc7bae /lib/sqlalchemy/orm/unitofwork.py | |
parent | 376b8276f0a7acb1f95313ca604e273d7c981f57 (diff) | |
download | sqlalchemy-afba8ab659f2c9ee7084358b6db5f61920b1691c.tar.gz |
- added missing coverage for self-referential many-to-many flushes
- some other areas where per-state deps are called and an empty result returned
are still lacking coverage.
Diffstat (limited to 'lib/sqlalchemy/orm/unitofwork.py')
-rw-r--r-- | lib/sqlalchemy/orm/unitofwork.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py index ca8c31e86..85ed790d9 100644 --- a/lib/sqlalchemy/orm/unitofwork.py +++ b/lib/sqlalchemy/orm/unitofwork.py @@ -4,19 +4,11 @@ # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -"""The internals for the Unit Of Work system. +"""The internals for the unit of work system. -Includes hooks into the attributes package enabling the routing of -change events to Unit Of Work objects, as well as the flush() -mechanism which creates a dependency structure that executes change -operations. - -A Unit of Work is essentially a system of maintaining a graph of -in-memory objects and their modified state. Objects are maintained as -unique against their primary key identity using an *identity map* -pattern. The Unit of Work then maintains lists of objects that are -new, dirty, or deleted and provides the capability to flush all those -changes at once. +The session's flush() process passes objects to a contextual object +here, which assembles flush tasks based on mappers and their properties, +organizes them in order of dependency, and executes. """ @@ -79,11 +71,6 @@ class UOWEventHandler(interfaces.AttributeExtension): class UOWTransaction(object): - """Handles the details of organizing and executing transaction - tasks during a UnitOfWork object's flush() operation. - - """ - def __init__(self, session): self.session = session self.mapper_flush_opts = session._mapper_flush_opts |