I've found that sometimes sqlalchemy inserts objects during
session.commit() not in the order they have been added using session.add()
I've put my code example and the output to the github gist.
https://gist.github.com/vpol/8da4a512308ae351eaf6
My question is similar to this one:
the order in which you put things into session.add() is significant only
within the scope of a certain mapped class, that is, the order that you put
a bunch of Foo() objects into session.add() will be maintained, however a
series of Bar() objects are handled separately.
Between different object