<property name="componentpartId" type="long" not-null="true" column="p_componentpart_id"/>
<set name="b" lazy="true" cascade="none" fetch="join">
<key column="p_componentpart_id" property-ref="componentpartId" />
<one-to-many class="B" />
</set>
B
<many-to-one name="a" class="A" column="p_componentpart_id" property-ref="componentpartId" cascade="none" ....../>
Hibernate一对多使用非主键关联设置
最新推荐文章于 2019-05-09 11:30:45 发布