hibernate中 one to many和many to one的非主键关联
生活随笔
收集整理的這篇文章主要介紹了
hibernate中 one to many和many to one的非主键关联
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Many to one:
update="false" insert="false"
class="com.alcatel.asb.hdm.report.etkt.entity.AreaCodeMapping">
關(guān)鍵使用property-ref
One to many:
使用property-ref.
23.4.5. Associations on alternate keys
property-ref="person"
cascade="all"
fetch="join"/>
inverse="true">
property-ref="userId"/>
column="userId"
property-ref="userId"/>
轉(zhuǎn)載于:http://blog.itpub.net/25261409/viewspace-1056382/
總結(jié)
以上是生活随笔為你收集整理的hibernate中 one to many和many to one的非主键关联的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: magento --增加新的产品类型示例
- 下一篇: c语言上机试题8,7-8-C语言上机考试