DDC-3271: Impossible to set-up Two relations one-to-one which share the same target #4047

Closed
opened 2026-01-22 14:34:19 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 25, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user lyrixx:

I reproduced my issue in a SF2 standard edition.

https://github.com/lyrixx/symfony-standard/blob/doctrine-many/test.php

So basically:

I have a "dude" table, with 2 FK: "delivery_address" and "billing_address".
But I'm not able to set-up doctrine to make it work, because when I set-up
the "Address" Entity, doctrine add a "unique" constraint on this table.
So I can insert one of the two addresses, but not two addresses.

Originally created by @doctrinebot on GitHub (Aug 25, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user lyrixx: I reproduced my issue in a SF2 standard edition. https://github.com/lyrixx/symfony-standard/blob/doctrine-many/test.php So basically: I have a "dude" table, with 2 FK: "delivery_address" and "billing_address". But I'm not able to set-up doctrine to make it work, because when I set-up the "Address" Entity, doctrine add a "unique" constraint on this table. So I can insert one of the two addresses, but not two addresses.
admin added the Bug label 2026-01-22 14:34:19 +01:00
admin closed this issue 2026-01-22 14:34:19 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 19, 2014):

Comment created by @ocramius:

This is actually how one-to-one works: you are probably looking for a different association type here.

@doctrinebot commented on GitHub (Oct 19, 2014): Comment created by @ocramius: This is actually how one-to-one works: you are probably looking for a different association type here.
Author
Owner

@doctrinebot commented on GitHub (Oct 19, 2014):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Oct 19, 2014): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4047