[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-19 Thread King Simon-NFHD78
Michael Bayer wrote: On Mar 17, 2007, at 11:39 AM, Simon King wrote: I had assumed that post_update was only necessary when you are inserting two rows that are mutually dependent, but in this case I wasn't inserting either a ReleaseLine or a Label. I suppose post_update can

[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-19 Thread svilen
Michael Bayer wrote: So you can take the post_update out and update to rev 2424. i have a problem with this 2424, before that was ok. As i can't separate a short case now, here the conditions: multi-table-inheritance, polymorphic. Nothing else too fancy. table_Entity has primary db_id,

[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-19 Thread Michael Bayer
but sure give me the logs with sqlalchemy.orm == logging.DEBUG On Mar 19, 2007, at 6:49 AM, svilen wrote: Michael Bayer wrote: So you can take the post_update out and update to rev 2424. i have a problem with this 2424, before that was ok. As i can't separate a short case now, here the

[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-17 Thread Simon King
On Mar 16, 9:50 pm, Michael Bayer [EMAIL PROTECTED] wrote: oh, this is easy. you have a circular insert relationship between label and release_line, which you can see in the sort there (the cycles:) as well as evidenced by the fact that you have a use_alter needed in order to create the

[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-16 Thread Michael Bayer
On Mar 16, 2007, at 6:59 AM, King Simon-NFHD78 wrote: Unfortunately I don't know how to go about debugging this. I think I need to see exactly what is going on in the dependency sort. Do you have any suggestions for suitable places to add some extra logging? these issues are often due

[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-16 Thread Michael Bayer
I can actually read a fair degree from these dumps, i need mostly to know what the actual dependencies are (i.e. which classes are dependent on what, whats the error). also when you do the full debug echoing the UOW should illustrate a series of dependency tuples which will show what

[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-16 Thread King Simon-NFHD78
I've just run the attached script about thirty times, and it succeeded 5 times and failed the rest. I've cut out a lot of unnecessary stuff, but it's still a bit long I'm afraid. I'll cut it down some more, but since you seemed so eager to see it ;-) I thought I'd send it along as is. On a bad

[sqlalchemy] Re: Inconsistent results in session.flush()

2007-03-16 Thread Michael Bayer
oh, this is easy. you have a circular insert relationship between label and release_line, which you can see in the sort there (the cycles:) as well as evidenced by the fact that you have a use_alter needed in order to create the foreign keys on those two tables. add post_update=True to