Merge "Flush objects by ourselves before processing before_commit event"
This commit is contained in:
commit
83ecf60999
@ -278,7 +278,10 @@ def load_one_to_manys(session):
|
|||||||
# have eliminated all places where related objects are constructed
|
# have eliminated all places where related objects are constructed
|
||||||
# using a key rather than a relationship.
|
# using a key rather than a relationship.
|
||||||
|
|
||||||
add_to_rel_load_list(session) # capture any new objects
|
# capture any new objects
|
||||||
|
if session.new:
|
||||||
|
session.flush()
|
||||||
|
|
||||||
if session.transaction.nested:
|
if session.transaction.nested:
|
||||||
# wait until final commit
|
# wait until final commit
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user