summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/unitofwork.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-11-18 02:13:56 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-11-18 02:13:56 +0000
commit622a26a6551a3580c844b634519ab963c7f35aaf (patch)
tree24f6a07624805a26a8b7ae689df9181d41d19067 /lib/sqlalchemy/orm/unitofwork.py
parente076169d390df8a9e90aa46053db34fd5815598a (diff)
downloadsqlalchemy-622a26a6551a3580c844b634519ab963c7f35aaf.tar.gz
- session.refresh() and session.expire() now support an additional argument
"attribute_names", a list of individual attribute keynames to be refreshed or expired, allowing partial reloads of attributes on an already-loaded instance. - finally simplified the behavior of deferred attributes, deferred polymorphic load, session.refresh, session.expire, mapper._postfetch to all use a single codepath through query._get(), which now supports a list of individual attribute names to be refreshed. the *one* exception still remaining is mapper._get_poly_select_loader(), which may stay that way since its inline with an already processing load operation. otherwise, query._get() is the single place that all "load this instance's row" operation proceeds. - cleanup all over the place
Diffstat (limited to 'lib/sqlalchemy/orm/unitofwork.py')
-rw-r--r--lib/sqlalchemy/orm/unitofwork.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py
index 7f9a4d7d0..2cd7cb6f5 100644
--- a/lib/sqlalchemy/orm/unitofwork.py
+++ b/lib/sqlalchemy/orm/unitofwork.py
@@ -128,7 +128,7 @@ class UnitOfWork(object):
if hasattr(obj, '_sa_insert_order'):
delattr(obj, '_sa_insert_order')
self.identity_map[obj._instance_key] = obj
- attribute_manager.commit(obj)
+ obj._state.commit_all()
def register_new(self, obj):
"""register the given object as 'new' (i.e. unsaved) within this unit of work."""