[DDC-1382] getIdentifierValues causes an exception on entyties that have only association keys Created: 19/Sep/11  Updated: 15/Oct/11  Resolved: 03/Oct/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.1
Fix Version/s: 2.1.3
Security Level: All

Type: Bug Priority: Major
Reporter: Asmir Mustafic Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None
Environment:

ubuntu



 Description   

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)



 Comments   
Comment by Guilherme Blanco [ 03/Oct/11 ]

Fixed in https://github.com/doctrine/doctrine2/commit/24042863acbabdcd0fa1432135a9836467f3bce7

It should be available in next release.

Generated at Thu Apr 24 19:22:37 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.