A 1---* A_B *---1 B
表 A 有 aID (PK),表 B 有 bID (PK),表 A_B 有:
aID (PK, FK), bID (PK, FK), 数字
我试过
property name="A" fieldtype="many-to-one" cfc="A" fkcolumn="aID";
property name="B" fieldtype="many-to-one" cfc="B" fkcolumn="bID";
property name="num" type="numeric";
但是 CF 一直问我要一个 ID 列……我该怎么办?FK的应该是PK的。
如果CFC中没有办法指定,如何在hbm xml中表示这个链接表?
谢谢