diff options
| author | Jason Kirtland <jek@discorporate.us> | 2010-02-11 00:43:34 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2010-02-11 00:43:34 +0000 |
| commit | e38b11928a4d0902dde5c45e0df99565df85d6ba (patch) | |
| tree | 4c45f114b2aad11ed87ac1b41d2b04d1fce17600 /lib/sqlalchemy/orm | |
| parent | bef9e234de84a1601df4d324feb5c422818a6d3d (diff) | |
| download | sqlalchemy-e38b11928a4d0902dde5c45e0df99565df85d6ba.tar.gz | |
Fixed bug in session.merge() blocking dict-like collections from merging.
Diffstat (limited to 'lib/sqlalchemy/orm')
| -rw-r--r-- | lib/sqlalchemy/orm/properties.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 486aa2e4b..8dbc6b3db 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -645,7 +645,10 @@ class RelationProperty(StrategizedProperty): if self.uselist: instances = source_state.get_impl(self.key).\ get(source_state, source_dict) - + if hasattr(instances, '_sa_adapter'): + # convert collections to adapters to get a true iterator + instances = instances._sa_adapter + if load: # for a full merge, pre-load the destination collection, # so that individual _merge of each item pulls from identity |
