public Integer getId() {
return id;
}
public void setId(Integer id) {
this
}
@Override
public int hashCode() {
int hash =
hash += (id != null ? id
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning
if (!(object instanceof Person)) {
return false;
}
Person other = (Person) object;
if ((this
return false;
}
return true;
}
@Override
public String toString() {
return
}
}
由於JPA是不需要配置的
<?xml version=
<!DOCTYPE hibernate
<hibernate
<class name=
<id name=
<generator class=
</id>
<property name=
<property name=
<set name=
<key column=
<one
</set>
</class>
<class name=
<id name=
<generator class=
</id>
<property name=
<property name=
<many
</class>
</hibernate
[
From:http://tw.wingwit.com/Article/program/Java/ky/201311/29047.html