[sqlalchemy] Re: Never-saved orphans are an error?

2007-02-13 Thread Michael Bayer
On Feb 12, 9:27 pm, SteveTether [EMAIL PROTECTED] wrote: I checked sess.new after the del and there it was, without my having called sess.save() on it. In my application I was after fully explicit control of sess.save() operations, applying them only to members of the data structure and

[sqlalchemy] Re: Never-saved orphans are an error?

2007-02-12 Thread SteveTether
On Feb 10, 11:48 am, Michael Bayer [EMAIL PROTECTED] wrote: del p.children[3] basically cascade has nothing to say about this operation when applied to transient instances. the history tracking will not see the item as ever being part of the children collection since you added it then

[sqlalchemy] Re: Never-saved orphans are an error?

2007-02-10 Thread Michael Bayer
del p.children[3] basically cascade has nothing to say about this operation when applied to transient instances. the history tracking will not see the item as ever being part of the children collection since you added it then removed it without flushing. also, the delete cascade operation

[sqlalchemy] Re: Never-saved orphans are an error?

2007-02-09 Thread SteveTether
Forgot to say I'm using SA 0.3.4. On Feb 9, 5:05 pm, SteveTether [EMAIL PROTECTED] wrote: The following code raises a FlushError because the child object named Cheshire is an orphan and the delete-orphan cascade rule is in effect. It seems to me that an orphan which has no database identity