Hibernate と Ehcache で変更可能な ID を使用しても安全ですか? hashCode
また、ID に基づいていることに注意してください。
class Company implements Serializable {
String code; // PK
public int hashCode() {
return code == null ? 17 : code.hashCode();
}
public boolean equals(Object o) {
// Some obvious equals checking for type and field equality
}
}