Details
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)
Fixed in https://github.com/doctrine/doctrine2/commit/24042863acbabdcd0fa1432135a9836467f3bce7
It should be available in next release.