many-to-many生成中间表

<!-- 岗位列表 -->
<set name="station" inverse="true" cascade="all,delete-orphan" table="T_USER_STATION" fetch="join">
	<key column="I_USER_ID" />
	<many-to-many class="org.apache.dream.common.entity.Station">
		<column name="I_STATION_ID" />
	</many-to-many>
</set>
 
<!-- 用户列表 -->
<set name="user" inverse="true" cascade="all,delete-orphan" table="T_USER_STATION" fetch="join">
	<key column="I_STATION_ID" />
	<many-to-many class="org.apache.dream.common.entity.User">
		<column name="I_USER_ID" />
	</many-to-many>
</set>
 

你可能感兴趣的:(man)