[英]Composite-id hibernate complicated mapping
我有 3 張桌子 A、B、C
Table A (
idA1 int unsigned not null,
idA2 int unsigned not null,
primary key(idA1, idA2)
)
Table B (
idB1 varchar(36) not null,
primary key(idB1)
)
Table C (
idC1 int unsigned not null,
idC2 varchar(36) not null,
idC3 int unsigned not null,
primary key(idC1, idC2, idC3),
foreign key(idC1, idC2) references A(idA1, idA2),
foreign key(idC3) references B(idB1)
)
我對鍵表 A 使用 conposite-id 但后來遇到映射表 C 的問題 如何使用下一個結構進行休眠映射?
我為我的問題找到了很好的解決方案
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.