- changed status to resolved
dynamic loaders with Session expunge/merge throw an exception
Issue #1352
resolved
As noted, when using s.expunge and adding a new instance through dynamic_loaders and merging it back to Session, exception occurs:
AttributeError: 'DynamicAttributeImpl' object has no attribute '_set_iterable'
test case attached.
Comments (3)
-
repo owner -
Account Deleted thanks for the tip&fix, it opened my eyes:)
-
repo owner - removed milestone
Removing milestone: 0.5.xx (automated comment)
- Log in to comment
fixed in 18106b5e5b682aa6aff8ecbab4dae776895c74de. note that merge() is not very efficient with a large collection though, since it has to load the entire thing in. A more efficient strategy is to use a backref to handle appends/deletes and to set cascade="save-update" (i.e. no merge) on the "dynamic" side.