[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-12 Thread Michael Bayer
On Nov 12, 2007, at 5:07 AM, che wrote: > > i had similar need to order things prev week. I thought that may be in > the future there will be possible to define some artificial dependency > (similar to relation) that have no its counterpart in the database in > order to meet similar requrements

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-12 Thread che
Hi, On 11 , 04:02, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Nov 10, 2007, at 4:54 PM, Manlio Perillo wrote: > > > Isn't it possible to just use the order used by the programmer? > > If I call > > save(A) > > save(B) > > the order of save() is signficant for instances of one class: > > sa

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-10 Thread Michael Bayer
On Nov 10, 2007, at 4:54 PM, Manlio Perillo wrote: > Isn't it possible to just use the order used by the programmer? > If I call > save(A) > save(B) > the order of save() is signficant for instances of one class: save(A1) save(A2) will insert A1 and A2 in that order. but beyond that, the ord

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-10 Thread Manlio Perillo
Michael Bayer ha scritto: > > On Nov 9, 2007, at 4:23 PM, Manlio Perillo wrote: > >> Michael Bayer ha scritto: >>> Sorry, I forgot to add that the mappers A and B must have a >>> relation() >>> specified in order for unit of work to determine the order of >>> operations. this has always been

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-09 Thread Michael Bayer
On Nov 9, 2007, at 4:23 PM, Manlio Perillo wrote: > > Michael Bayer ha scritto: >> Sorry, I forgot to add that the mappers A and B must have a >> relation() >> specified in order for unit of work to determine the order of >> operations. this has always been the case in all versions. >> illust

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-09 Thread Manlio Perillo
Michael Bayer ha scritto: > Sorry, I forgot to add that the mappers A and B must have a relation() > specified in order for unit of work to determine the order of > operations. this has always been the case in all versions. > illustrated in the attached script. > But I have a piece a cod

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-09 Thread Michael Bayer
Sorry, I forgot to add that the mappers A and B must have a relation() specified in order for unit of work to determine the order of operations. this has always been the case in all versions. illustrated in the attached script. --~--~-~--~~~---~--~~ You re

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-09 Thread Michael Bayer
what do your Table objects look like ? a ForeignKey() object must be present on the "y" column of "B" in order for the unit of work to know the proper order of operations (or the mappers must have explicit primaryjoin/foreign_keys parameters configured). On Nov 9, 10:42 am, Manlio Perillo <[EMA