summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/dynamic.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-12-05 20:43:16 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-12-05 20:43:16 +0000
commit9e4052dc8be2451d1c48bb059da150ce41ddc86f (patch)
treea8711523c53feafa142073e6689a51b9cfcc5608 /lib/sqlalchemy/orm/dynamic.py
parent238c2c8dbe3ca5b92d298b39e96f81eb416d1413 (diff)
downloadsqlalchemy-9e4052dc8be2451d1c48bb059da150ce41ddc86f.tar.gz
- a major behavioral change to collection-based backrefs: they no
longer trigger lazy loads ! "reverse" adds and removes are queued up and are merged with the collection when it is actually read from and loaded; but do not trigger a load beforehand. For users who have noticed this behavior, this should be much more convenient than using dynamic relations in some cases; for those who have not, you might notice your apps using a lot fewer queries than before in some situations. [ticket:871]
Diffstat (limited to 'lib/sqlalchemy/orm/dynamic.py')
-rw-r--r--lib/sqlalchemy/orm/dynamic.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/dynamic.py b/lib/sqlalchemy/orm/dynamic.py
index 56cf58d9b..0c49bcfc3 100644
--- a/lib/sqlalchemy/orm/dynamic.py
+++ b/lib/sqlalchemy/orm/dynamic.py
@@ -44,12 +44,12 @@ class DynamicAttributeImpl(attributes.AttributeImpl):
state.dict[self.key] = c = CollectionHistory(self, state)
return c
- def append(self, state, value, initiator):
+ def append(self, state, value, initiator, passive=False):
if initiator is not self:
self.get_history(state)._added_items.append(value)
self.fire_append_event(state, value, initiator)
- def remove(self, state, value, initiator):
+ def remove(self, state, value, initiator, passive=False):
if initiator is not self:
self.get_history(state)._deleted_items.append(value)
self.fire_remove_event(state, value, initiator)