日期:2014-05-17 浏览次数:20761 次
class Dept{
....
Set<Group> groups;
get/set....
}
class Group{
....
set<Dept> depts;
get/set....
}
<set name="groups" table="DEPT_TO_GROUP" inverse="true" >
<key column="DEPTID"/>
<many-to-many class="com.Group" column="GROUPID" />
</set>
<set name="depts" table="DEPT_TO_GROUP">
<key column="GROUPID"/>
<many-to-many class="com.bean.Dept" column="DEPTID"/>
</set>