Using thoses JPA properties
props.put( \"hibernate.cache.use_query_cache\", \"true\" );
props.put( \"hibernate.cache.use_second_level_cache\", \"true\" );
p
Recursive version Full working
Class org.hibernate.type.AbstractType
public int getHashCode(Object x) {
if (x instanceof Object[]){
int result = 1;
for (Object element : (Object[]) x)
result = 31 * result + (element == null ? 0 : getHashCode(element));
return result;
}
return x.hashCode();
}
AND
public static boolean arraysEquals(Object[] a, Object[] a2) {
if (a==a2)
return true;
if (a==null || a2==null)
return false;
int length = a.length;
if (a2.length != length)
return false;
for (int i=0; i