DDC-1382: getIdentifierValues causes an exception on entyties that have only association keys #1729

Closed
opened 2026-01-22 13:23:32 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 19, 2011).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user goetas:

On entities that have only association keys as primary keys:

Calling BasicEntityPersister::exists() cause the invocation of ClassMetadata::getIdentifierValues() method.
This method returns associated entities as identifier values.
Then BasicEntityPersister::exists() tries to converts these objects to string, instead of searching their primary keys.

Some problems:

  • getIdentifierValues have not access to external world (only its class metadata and the current entity).
  • getIdentifierValues is uses in many places of doctrine

(sorry for my bad English)

Originally created by @doctrinebot on GitHub (Sep 19, 2011). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user goetas: On entities that have only association keys as primary keys: Calling BasicEntityPersister::exists() cause the invocation of ClassMetadata::getIdentifierValues() method. This method returns associated entities as identifier values. Then BasicEntityPersister::exists() tries to converts these objects to string, instead of searching their primary keys. Some problems: - getIdentifierValues have not access to external world (only its class metadata and the current entity). - getIdentifierValues is uses in many places of doctrine (sorry for my bad English)
admin added the Bug label 2026-01-22 13:23:32 +01:00
admin closed this issue 2026-01-22 13:23:33 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 3, 2011):

Comment created by @guilhermeblanco:

Fixed in 24042863ac

It should be available in next release.

@doctrinebot commented on GitHub (Oct 3, 2011): Comment created by @guilhermeblanco: Fixed in https://github.com/doctrine/doctrine2/commit/24042863acbabdcd0fa1432135a9836467f3bce7 It should be available in next release.
Author
Owner

@doctrinebot commented on GitHub (Oct 3, 2011):

Issue was closed with resolution "Fixed"

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

No dependencies set.

Reference: doctrine/archived-orm#1729