Re: [sqlalchemy] One-to-one relationship with delete-orphan and update breaks UniqueConstraint

2017-08-31 Thread Levon Saldamli
Thank you for your answer. I think detaching and doing a session.flush() is a good enough solution for now. Den onsdag 30 augusti 2017 kl. 16:31:03 UTC+2 skrev Mike Bayer: > > On Wed, Aug 30, 2017 at 7:52 AM, Levon Saldamli > wrote: > > I'm trying to have to objects with a

[sqlalchemy] One-to-one relationship with delete-orphan and update breaks UniqueConstraint

2017-08-30 Thread Levon Saldamli
I'm trying to have to objects with a one-to-one relationship, e.g. User and Address, with a UniqueConstraint for user.id in the address table (names changed from the real code). But when user.address is updated, the commit fails because the UniqueConstraint is broken, probably because