more relation/collection state confusion when using session.flush([only_one_of_the_objects]). time to deprecate ?
Issue #1315
resolved
Testcase is in the attachment. I'll be glad to help if you point me.
Angri
Comments (4)
-
repo owner -
repo owner - changed title to more relation/collection state confusion when using session.flush([only_one_of_the_objects]). time to deprecate ?
- changed milestone to 0.6.0
1d3185139a923fa1a1998d4498748d8f49278ac0 allows you to properly reset the state of
parent.children
:session.flush([child](child)) session.expire(parent, ['children']('children')) assert parent.children == [child](child), "%r != %r" % (parent.children, [child](child))
but seriously, try to not use
flush([obj](obj))
. it makes no sense to use it on a single object in the midst of an interconnected graph of dependencies. -
repo owner we've agreed on the deprecation, that's in b84c3b34694f36255e203af5a9d531ff89464bdc.
-
repo owner - removed milestone
Removing milestone: 0.5.xx (automated comment)
- Log in to comment
I'm considering as a solution here to remove the
flush([objects](objects))
feature in 0.6. There should be no use case for it.