On Mar 6, 2009, at 6:14 PM, Shawn Church wrote:
> > But setting the User.modified_by relation does not work: > >>>> user.modified_by = user the key here is that you're setting modified_by to the parent, which means you are creating a row that's dependent on itself. This will work on UPDATE but not on INSERT. there's an option called "post_update=True" which, when applied to the relation(), would cause a second UPDATE statement to come in and update the row to set the foreign key - that should fix it. but then all INSERTs are going to be accompanied by a second UPDATE even when it's not needed. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
