如何在hibernate中映射连接类

时间:2014-02-27 13:47:56

标签: java hibernate mapping

我想映射节点,单元和模块类来执行此选择:

select n.nid, n.nnm, n.nhwtype, u.unnr, u.unhwtype, u.unslot, m.mpos, m.mhwtype from node n, unit u, module m where n.nid*=u.nid and n.nid*=m.nid and u.nid*=m.nid and u.unnr*=m.unnr and n.nhwtype in (10020, 10021, 10022, 10023, 10002, 10017, 10001) and m.mpos not between 11 and 10000

(ONE)节点 - >单位(MANY)

(ONE)单位 - >模块(MANY)

我尝试了很多次,但我没有成功。

0 个答案:

没有答案