HHH-10835 The hash code calculation of the EntityKey should also include the hash code of the root entity name.

This commit is contained in:
Andrej Golovnin 2016-06-11 22:39:16 +02:00 committed by Sanne Grinovero
parent 5318cef733
commit 28af8cb95a
1 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,8 @@ public final class EntityKey implements Serializable {
private int generateHashCode() {
int result = 17;
final String rootEntityName = persister.getRootEntityName();
result = 37 * result + ( rootEntityName != null ? rootEntityName.hashCode() : 0 );
result = 37 * result + persister.getIdentifierType().getHashCode( identifier, persister.getFactory() );
return result;
}