Jira issue originally created by user honzap:
I think, in BasicEntityPersister is bug in detecting types:
The $types array is not defined inside closure function. This makes problem with deleting entity with two and more primary keys which one of them references to another entity with reference too.
My relationship (example):
Email(userid, email) but FK (and @manyToOne relation) on userid field references to Person table/entity, not User. FK in Person entity references to User of course.
Trying delete the Email entity record throws exception based a few lines later.
Comment created by @FabioBatSilva:
Fixed : 7055ccb
Issue was closed with resolution "Fixed"
Comment created by honzap:
I agree with fix. I've done the same at my local repo and it works well. Thanks for confirmation.