Hibernate联合主键映射
三个表
表A 表B
a_id b_id
表C
a_id
b_id
这三个表的映射怎么写呀!·
请高手指点下
谢谢!
------解决方案-------------------- <composite-id
name= "c.id "
class= "c "
unsaved-value= "none "
>
<key-many-to-one name= "a " class= "a " column= "a.id "/>
<key-many-to-one name= "b " class= "b " column= "b.id "/>
</composite-id>