Re: [sqlalchemy] auto-flush getting order of inserts wrong when sessionmaker used

2011-02-27 Thread Michael Bayer
On Feb 27, 2011, at 10:28 AM, Michael Bayer wrote: > > On Feb 27, 2011, at 3:28 AM, Chris Withers wrote: > >> On 27/02/2011 06:34, Michael Bayer wrote: >>> More interestingly, why does the use of sessionmaker versus the use of the standard Session class make a difference? >>> >>> t

Re: [sqlalchemy] auto-flush getting order of inserts wrong when sessionmaker used

2011-02-27 Thread Michael Bayer
On Feb 27, 2011, at 3:28 AM, Chris Withers wrote: > On 27/02/2011 06:34, Michael Bayer wrote: >> >>> More interestingly, why does the use of sessionmaker versus the use of the >>> standard Session class make a difference? >> >> the unit of work issues INSERTS in order for a single kind of enti

Re: [sqlalchemy] auto-flush getting order of inserts wrong when sessionmaker used

2011-02-27 Thread Chris Withers
On 27/02/2011 06:34, Michael Bayer wrote: More interestingly, why does the use of sessionmaker versus the use of the standard Session class make a difference? the unit of work issues INSERTS in order for a single kind of entity.It doesn't do that across all entities since the dependency

Re: [sqlalchemy] auto-flush getting order of inserts wrong when sessionmaker used

2011-02-26 Thread Michael Bayer
On Feb 26, 2011, at 1:17 PM, Chris Withers wrote: > On 26/02/2011 15:50, Michael Bayer wrote: >> >>> On 25/02/2011 17:13, Michael Bayer wrote: can't reproduce. See attached.This test includes randomization of all key data structures in the UOW which smokes out any issues in depen

Re: [sqlalchemy] auto-flush getting order of inserts wrong when sessionmaker used

2011-02-26 Thread Chris Withers
On 26/02/2011 15:50, Michael Bayer wrote: On 25/02/2011 17:13, Michael Bayer wrote: can't reproduce. See attached.This test includes randomization of all key data structures in the UOW which smokes out any issues in dependency sorting. Okay, so after about an hour of stripping down cod

Re: [sqlalchemy] auto-flush getting order of inserts wrong when sessionmaker used

2011-02-26 Thread Michael Bayer
On Feb 26, 2011, at 4:17 AM, Chris Withers wrote: > On 25/02/2011 17:13, Michael Bayer wrote: >> can't reproduce. See attached.This test includes randomization of all >> key data structures in the UOW which smokes out any issues in dependency >> sorting. > > Okay, so after about an hour o

Re: [sqlalchemy] auto-flush getting order of inserts wrong when sessionmaker used

2011-02-26 Thread Chris Withers
On 25/02/2011 17:13, Michael Bayer wrote: can't reproduce. See attached.This test includes randomization of all key data structures in the UOW which smokes out any issues in dependency sorting. Okay, so after about an hour of stripping down code, please find attached a minimal reproducib