summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/properties.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-01-24 21:31:23 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-01-24 21:31:23 -0500
commita477f8a61ec60b2fc343d87aa30ef6595c77727d (patch)
treea3768faf5fb9513cefebaa02f122bd1565f057ce /lib/sqlalchemy/orm/properties.py
parentb1df6fab53a0d740fe60f04e5c9ad01027ba59af (diff)
downloadsqlalchemy-a477f8a61ec60b2fc343d87aa30ef6595c77727d.tar.gz
the consideration of a pending object as
an "orphan" has been modified to more closely match the behavior as that of persistent objects, which is that the object is expunged from the :class:`.Session` as soon as it is de-associated from any of its orphan-enabled parents. Previously, the pending object would be expunged only if de-associated from all of its orphan-enabled parents. The new flag ``legacy_is_orphan`` is added to :func:`.orm.mapper` which re-establishes the legacy behavior. [ticket:2655]
Diffstat (limited to 'lib/sqlalchemy/orm/properties.py')
-rw-r--r--lib/sqlalchemy/orm/properties.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index bc238d973..c618e89b2 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -1081,7 +1081,7 @@ class RelationshipProperty(StrategizedProperty):
self.target = self.mapper.mapped_table
if self.cascade.delete_orphan:
- self.mapper.primary_mapper().delete_orphans.append(
+ self.mapper.primary_mapper()._delete_orphans.append(
(self.key, self.parent.class_)
)