dynamic loaders with Session expunge/merge throw an exception

Issue #1352 resolved
Former user created an issue

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)

  1. Mike Bayer repo owner

    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.

  2. Log in to comment