From: Mike Bayer Date: Mon, 10 Dec 2007 18:42:39 +0000 (+0000) Subject: comment X-Git-Tag: rel_0_4_2~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c468a274442d8d8dbf0ec2cd1182143278033500;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git comment --- diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index 9515ba77fb..bbbdce6984 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -790,6 +790,9 @@ class Query(object): for instance in context.identity_map.values(): context.attributes.get(('populating_mapper', id(instance)), object_mapper(instance))._post_instance(context, instance) + # "refresh_instance" may be loaded from a row which has no primary key columns to identify it. + # this occurs during the load of the "joined" table in a joined-table inheritance mapper, and saves + # the need to join to the primary table in those cases. if context.refresh_instance and context.only_load_props and context.refresh_instance.dict['_instance_key'] in context.identity_map: # if refreshing partial instance, do special state commit # affecting only the refreshed attributes