HHH-12746 : CacheKeyImplementation objects with different entityOrRoleName and same id/tenantId have the same hashCode

(cherry picked from commit 220f41dc3b)
This commit is contained in:
Gail Badner 2018-06-28 17:35:59 -07:00
parent a7ac22c686
commit d8fe2ebdae
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ final class CacheKeyImplementation implements Serializable {
private int calculateHashCode(Type type, SessionFactoryImplementor factory) {
int result = type.getHashCode( id, factory );
result = 31 * result + entityOrRoleName.hashCode();
result = 31 * result + (tenantId != null ? tenantId.hashCode() : 0);
return result;
}