DDC-2039: [GH-452] fix persistance for many-to-one association when using not primary key for referenced column #2570

Closed
opened 2026-01-22 13:57:17 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 21, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of timaschew:

Url: https://github.com/doctrine/doctrine2/pull/452

Message:

Bugfix for exception:
Undefined index: xyz in ...\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php line 608
Problem occur, if you are using not the primary key for a many-to-one��association.
For example if you using: @JoinColumn(name="address_no", referencedColumnName="a_no")
$newValId has only the primary key as element, but��
$newValId[$targetColumn] becomes in this case��
$newValId['a_no'] and this element does not exist -> exception

Originally created by @doctrinebot on GitHub (Sep 21, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: This issue is created automatically through a Github pull request on behalf of timaschew: Url: https://github.com/doctrine/doctrine2/pull/452 Message: Bugfix for exception: Undefined index: xyz in ...\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php line 608 Problem occur, if you are using not the primary key for a many-to-one��association. For example if you using: @JoinColumn(name="address_no", referencedColumnName="a_no") $newValId has only the primary key as element, but�� $newValId[$targetColumn] becomes in this case�� $newValId['a_no'] and this element does not exist -> exception
admin added the Bug label 2026-01-22 13:57:17 +01:00
admin closed this issue 2026-01-22 13:57:17 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 5, 2012):

Comment created by @beberlei:

A related Github Pull-Request [GH-452] was closed
https://github.com/doctrine/doctrine2/pull/452

@doctrinebot commented on GitHub (Oct 5, 2012): Comment created by @beberlei: A related Github Pull-Request [GH-452] was closed https://github.com/doctrine/doctrine2/pull/452
Author
Owner

@doctrinebot commented on GitHub (Oct 5, 2012):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Oct 5, 2012): Issue was closed with resolution "Invalid"
Author
Owner

@doctrinebot commented on GitHub (Dec 22, 2013):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-452] was closed:
https://github.com/doctrine/dbal/pull/452

@doctrinebot commented on GitHub (Dec 22, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-452] was closed: https://github.com/doctrine/dbal/pull/452
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2570