DDC-1649: Triple split mapping issue with Doctrine2 #2072

Open
opened 2026-01-22 13:39:35 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 13, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user david2tm:

For starters you can see discussion [here].

The issue arise then I have 3 (and I guess more) tables sharing their PK (split tables), for example.:

Table Auth which holds user_id PK.
Table OurUsers for which Auth.user_id is shared PK.
Table EmailVerification for which OurUsers.user_id is shared PK.
I also have NotOurUsers - hence the split.

Attached is Entity definitions.

with version 2.1 and 2.2 I'm able to add new records (insert) to EmailVerification but not to update them (stack trace #1 attached, for 2.2). And it failed mapping validation. It passes validation with 2.2.
with version 2.1 I was able to use EntityManager::find('EmailVerification', $objectOfOurUsers) calling the same with 2.2 produces error (stack trace #2 attached), with 2.2. I can only call EntityManager::find('EmailVerification', $objectOfOurUsers->getUser()->getID())

Originally created by @doctrinebot on GitHub (Feb 13, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user david2tm: For starters you can see discussion [[here](http://stackoverflow.com/questions/9207403/triple-split-mapping-issue-with-doctrine2)]. The issue arise then I have 3 (and I guess more) tables sharing their PK (split tables), for example.: Table Auth which holds user_id PK. Table OurUsers for which Auth.user_id is shared PK. Table EmailVerification for which OurUsers.user_id is shared PK. I also have NotOurUsers - hence the split. Attached is Entity definitions. with version 2.1 and 2.2 I'm able to add new records (insert) to EmailVerification but not to update them (stack trace #1 attached, for 2.2). And it failed mapping validation. It passes validation with 2.2. with version 2.1 I was able to use EntityManager::find('EmailVerification', $objectOfOurUsers) calling the same with 2.2 produces error (stack trace #2 attached), with 2.2. I can only call EntityManager::find('EmailVerification', $objectOfOurUsers->getUser()->getID())
admin added the Bug label 2026-01-22 13:39:35 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2072