From 622a26a6551a3580c844b634519ab963c7f35aaf Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 18 Nov 2007 02:13:56 +0000 Subject: - 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 --- lib/sqlalchemy/orm/unitofwork.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/orm/unitofwork.py') 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.""" -- cgit v1.2.1