DDC-3058: [GH-993] Update JoinColumn.php #3796

Closed
opened 2026-01-22 14:28:10 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 28, 2014).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user @doctrinebot:

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

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

Message:

If $referencedColumnName = 'id' by default, it doesn't make sense to make checks like:

if (empty($joinColumn['referencedColumnName'])) {

(ClassMetaDataInfo file)


Considering you map your column

@ORM\JoinColumn(onDelete="CASCADE")

You'll get JoinColumn with 'id' value, which doesn't let doctrine use naming strategies for referenced column names

Originally created by @doctrinebot on GitHub (Mar 28, 2014). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of KamilKopaczyk: Url: https://github.com/doctrine/doctrine2/pull/993 Message: If $referencedColumnName = 'id' by default, it doesn't make sense to make checks like: ``` php if (empty($joinColumn['referencedColumnName'])) { ``` (ClassMetaDataInfo file) --- Considering you map your column ``` @ORM\JoinColumn(onDelete="CASCADE") ``` You'll get JoinColumn with 'id' value, which doesn't let doctrine use naming strategies for referenced column names
admin added the Bug label 2026-01-22 14:28:10 +01:00
admin closed this issue 2026-01-22 14:28:10 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 21, 2014):

Comment created by @doctrinebot:

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

@doctrinebot commented on GitHub (Apr 21, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-993] was closed: https://github.com/doctrine/doctrine2/pull/993
Author
Owner

@doctrinebot commented on GitHub (Apr 21, 2014):

Comment created by @guilhermeblanco:

Unfortunately, while this is true for Annotations (it can never be empty), it is not for XML, YAML and PHP itself.
When using Annotations, we keep convention over configuration as the standard, providing the default id, while we require further configuration on other drivers.

Closing as invalid.

@doctrinebot commented on GitHub (Apr 21, 2014): Comment created by @guilhermeblanco: Unfortunately, while this is true for Annotations (it can never be empty), it is not for XML, YAML and PHP itself. When using Annotations, we keep convention over configuration as the standard, providing the default id, while we require further configuration on other drivers. Closing as invalid.
Author
Owner

@doctrinebot commented on GitHub (Apr 21, 2014):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Apr 21, 2014): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3796