ITeye博客

Hibernate一对多使用非主键关联设置

colky · 2008-07-15 15:24 · JAVA · Markdown

A

<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" ....../>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。