mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
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:
parent
5318cef733
commit
28af8cb95a
@ -56,6 +56,8 @@ public EntityKey(Serializable id, EntityPersister persister) {
|
||||
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user