public class Group {
private int id;
private String groupName;
private int id;
private String groupName;
}
public class User {
private int id;
private String username;
private String userpwd;
private Group group;
}
private int id;
private String username;
private String userpwd;
private Group group;
}
<class name="Group" table="t_group">
<id name="id" >
<column name="id" />
<generator class="native"></generator>
</id>
<property name="groupName" >
<column name="groupName" length="50" />
</property>
</class>
<id name="id" >
<column name="id" />
<generator class="native"></generator>
</id>
<property name="groupName" >
<column name="groupName" length="50" />
</property>
</class>
<id name="id" >
<column name="id" />
<generator class="native"></generator>
</id>
<property name="username" >
<column name="username" length="50" />
</property>
<property name="userpwd" >
<column name="userpwd" length="50" />
</property>
<many-to-one name="group" column="t_group"></many-to-one>