Repaired hashCode and equals in entities