diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-01-30 00:16:42 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-01-30 00:16:42 +0000 |
commit | 6f7af7017449fd869594bd06b149061e54d21f08 (patch) | |
tree | 55a09abf22b7196be75d47a42300e697ce04cd28 /lib/sqlalchemy | |
parent | e6bd0c0f32f1af7715dc4649202c7c0ac9d1187a (diff) | |
download | sqlalchemy-6f7af7017449fd869594bd06b149061e54d21f08.tar.gz |
- fixed bug where cascade operations incorrectly included deleted collection
items in the cascade [ticket:445]
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/orm/properties.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index 42c017bc5..09c90c6ac 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -151,11 +151,8 @@ class PropertyLoader(StrategizedProperty): if not type in self.cascade: return passive = type != 'delete' or self.passive_deletes - childlist = sessionlib.attribute_manager.get_history(object, self.key, passive=passive) - if childlist is None: - return mapper = self.mapper.primary_mapper() - for c in childlist.added_items() + childlist.deleted_items() + childlist.unchanged_items(): + for c in sessionlib.attribute_manager.get_as_list(object, self.key, passive=passive): if c is not None and c not in recursive and (halt_on is None or not halt_on(c)): if not isinstance(c, self.mapper.class_): raise exceptions.AssertionError("Attribute '%s' on class '%s' doesn't handle objects of type '%s'" % (self.key, str(self.parent.class_), str(c.__class__))) |