diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-05-08 16:09:48 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-05-08 16:09:48 -0400 |
commit | 6ea6673376609ce6a5e26f9f20425cffee96bcd8 (patch) | |
tree | 937024d0317d18d6fdffbbca7ee32b2449162242 /lib/sqlalchemy/orm/dynamic.py | |
parent | 7009a3bc32daadf078e2806622615c665105240e (diff) | |
download | sqlalchemy-6ea6673376609ce6a5e26f9f20425cffee96bcd8.tar.gz |
- session.merge() will not expire attributes on the returned
instance if that instance is "pending". [ticket:1789]
Diffstat (limited to 'lib/sqlalchemy/orm/dynamic.py')
-rw-r--r-- | lib/sqlalchemy/orm/dynamic.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/dynamic.py b/lib/sqlalchemy/orm/dynamic.py index d7960406b..92632ac89 100644 --- a/lib/sqlalchemy/orm/dynamic.py +++ b/lib/sqlalchemy/orm/dynamic.py @@ -19,7 +19,7 @@ from sqlalchemy.orm import ( attributes, object_session, util as mapperutil, strategies, object_mapper ) from sqlalchemy.orm.query import Query -from sqlalchemy.orm.util import _state_has_identity, has_identity +from sqlalchemy.orm.util import has_identity from sqlalchemy.orm import attributes, collections class DynaLoader(strategies.AbstractRelationshipLoader): @@ -116,7 +116,7 @@ class DynamicAttributeImpl(attributes.AttributeImpl): collection_history = self._modified_event(state, dict_) new_values = list(iterable) - if _state_has_identity(state): + if state.has_identity: old_collection = list(self.get(state, dict_)) else: old_collection = [] |