读书人

hibernate set聚合配置 many-to-many

发布时间: 2012-07-04 19:33:54 作者: rapoo

hibernate set集合配置 many-to-many

1.user.hbm.xml

<set name="stationSet" table="T_USER_STATION" inverse="true" cascade="all" lazy="true"><key column="I_USER_ID" /><many-to-many column="I_STATION_ID" /></set>

?2.station.hbm.xml

<set name="userSet" table="T_USER_STATION" inverse="true" cascade="all" lazy="true"><key column="I_STATION_ID" /><many-to-many column="I_USER_ID" /></set>
?

读书人网 >其他数据库

热点推荐