mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
UniqueConstraint declared in inheritance (child) entity can't reach related object id #6498
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @remoteclient on GitHub (Jul 8, 2020).
Bug Report
I have a
CustomerAddresswith an embeddedAddress. This has a relation to aCustomer.BillingAddressandDeliveryAddressinherit from thisCustomerAddress.I want a
BillingAddressandCustomerAddressto be unique for aCustomerso that a Customer can have the same address set asBillingAddressandDeliveryAddressbut never the same address twice as maybeDeliverAddressfor oneCustomer.Summary
When I try to update the database I get
There is no column with name 'customer_id' on table 'mws_customer_billing_address'.Which obviously isn't right. So I can not have the desired behaviour.Expected behavior
Expected behaviour is, that the unique constraint sees the related customer id
Maybe related: #6248