[sqlalchemy] session.add order

2015-02-15 Thread Victor Poluksht
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:

Re: [sqlalchemy] session.add order

2015-02-15 Thread Michael Bayer
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