Am 11.07.2010 um 11:17 schrieb chaouche yacine:

--- On Thu, 7/1/10, Diez B. Roggisch <[email protected]> wrote:

There's one problem : the error I'm getting is not on
the foreign key constraint it's on the NOT NULL contraint.

This is because SA issues an update to the city, setting
the country to NULL. You can see that if you'd use my code
that set the bind's echo property to True.

Now honestly I don't know how to fix this, but this might
help:

http://www.sqlalchemy.org/docs/05/mappers.html#using-passive-deletes

Passing passive_deletes=True to the OneToMany-relation
might solve the issue of trying to update child-relations.

Diez

Should I consider this a bug and open a ticket for it ?

I'd say no. It is a documented behavior. Just not the one you expected.

Diez

--
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en.

Reply via email to