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.
(sorry for my bad English)
Comment created by @guilhermeblanco:
Fixed in 2404286
It should be available in next release.
Issue was closed with resolution "Fixed"