]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- inline the commit of partials too
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 29 Aug 2014 16:49:06 +0000 (12:49 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 29 Aug 2014 16:49:06 +0000 (12:49 -0400)
lib/sqlalchemy/orm/loading.py

index 8d32edea875d33d4c96ab232950c9c1f3dde3de7..3a29fd7773d49207bf1bcc3d055e39ea931f0767 100644 (file)
@@ -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)