summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/dynamic.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2018-01-24 11:09:47 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2018-01-24 20:55:13 -0500
commit4e2d825c63869a36aa3fbbca4550717a2e48e56f (patch)
tree73b16f4bb68801a0988dfef24d35ed17d2cb20c0 /lib/sqlalchemy/orm/dynamic.py
parentd41e73c79ceb3b250dca3afcb55f4ac1a1a2fea4 (diff)
downloadsqlalchemy-4e2d825c63869a36aa3fbbca4550717a2e48e56f.tar.gz
Ensure backrefs accommodate for op_bulk_replace
Fixed 1.2 regression regarding new bulk_replace event where a backref would fail to remove an object from the previous owner when a bulk-assignment assigned the object to a new owner. As this revisits the Event tokens associated with AttributeImpl objects, remove the verbosity of the "inline lazy init" pattern; the Event token is a simple slotted object and should have minimal memory overhead. Change-Id: Id188b4026fc2f3500186548008f4db8cdf7afecc Fixes: #4171
Diffstat (limited to 'lib/sqlalchemy/orm/dynamic.py')
-rw-r--r--lib/sqlalchemy/orm/dynamic.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/dynamic.py b/lib/sqlalchemy/orm/dynamic.py
index ffb4405aa..73d9ef3bb 100644
--- a/lib/sqlalchemy/orm/dynamic.py
+++ b/lib/sqlalchemy/orm/dynamic.py
@@ -47,6 +47,7 @@ class DynamicAttributeImpl(attributes.AttributeImpl):
default_accepts_scalar_loader = False
supports_population = False
collection = False
+ dynamic = True
def __init__(self, class_, key, typecallable,
dispatch,