From: Mike Bayer Date: Fri, 29 Aug 2014 16:49:06 +0000 (-0400) Subject: - inline the commit of partials too X-Git-Tag: rel_1_0_0b1~205^2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a95b0a5b6e132e44bcc9cc4429526533ab964787;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - inline the commit of partials too --- diff --git a/lib/sqlalchemy/orm/loading.py b/lib/sqlalchemy/orm/loading.py index 8d32edea87..3a29fd7773 100644 --- a/lib/sqlalchemy/orm/loading.py +++ b/lib/sqlalchemy/orm/loading.py @@ -72,9 +72,6 @@ def instances(query, cursor, context): if filtered: rows = util.unique_list(rows, filter_fn) - for state, (dict_, attrs) in context.partials.items(): - state._commit(dict_, attrs) - for row in rows: yield row @@ -414,11 +411,14 @@ def instance_processor(mapper, context, result, path, adapter, state.load_options = context.propagate_options if state.load_options: state.load_path = load_path + for key, populator in new_populators: if key not in attrs: continue populator(state, dict_, row) + state._commit(dict_, attrs) + for key, pop in eager_populators: if key not in unloaded: pop(state, dict_, row)