summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/dynamic.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2009-07-26 01:46:41 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2009-07-26 01:46:41 +0000
commit306c901946da9b06e79171c167a454cf0550b11d (patch)
tree6e7fba46d9aac79f332f1a23c6c4a5aa88684040 /lib/sqlalchemy/orm/dynamic.py
parent05a82671c37b778f091e2a15266a1867428f3fdb (diff)
downloadsqlalchemy-306c901946da9b06e79171c167a454cf0550b11d.tar.gz
- Squeezed a few more unnecessary "lazy loads" out of
relation(). When a collection is mutated, many-to-one backrefs on the other side will not fire off to load the "old" value, unless "single_parent=True" is set. A direct assignment of a many-to-one still loads the "old" value in order to update backref collections on that value, which may be present in the session already, thus maintaining the 0.5 behavioral contract. [ticket:1483]
Diffstat (limited to 'lib/sqlalchemy/orm/dynamic.py')
-rw-r--r--lib/sqlalchemy/orm/dynamic.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/dynamic.py b/lib/sqlalchemy/orm/dynamic.py
index 70243291d..0bc7bab24 100644
--- a/lib/sqlalchemy/orm/dynamic.py
+++ b/lib/sqlalchemy/orm/dynamic.py
@@ -100,7 +100,7 @@ class DynamicAttributeImpl(attributes.AttributeImpl):
dict_[self.key] = True
return state.committed_state[self.key]
- def set(self, state, dict_, value, initiator):
+ def set(self, state, dict_, value, initiator, passive=attributes.PASSIVE_OFF):
if initiator is self:
return