HHH-12746 : CacheKeyImplementation objects with different entityOrRoleName and same id/tenantId have the same hashCode
This commit is contained in:
parent
f166b044a6
commit
220f41dc3b
|
@ -55,6 +55,7 @@ final class CacheKeyImplementation implements Serializable {
|
||||||
|
|
||||||
private int calculateHashCode(Type type, SessionFactoryImplementor factory) {
|
private int calculateHashCode(Type type, SessionFactoryImplementor factory) {
|
||||||
int result = type.getHashCode( id, factory );
|
int result = type.getHashCode( id, factory );
|
||||||
|
result = 31 * result + entityOrRoleName.hashCode();
|
||||||
result = 31 * result + (tenantId != null ? tenantId.hashCode() : 0);
|
result = 31 * result + (tenantId != null ? tenantId.hashCode() : 0);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue