摘要:
这种查询,hibernate 建议用 From Dealer s inner join fetch s.carSerieses cs 实现,注意这种实现只支持b.c,不支持b.cs. 如果要用b.cs功能,用子查询代替 使用时注意:多对多后面如果还有1对多,那么后边的使用子查询. ----上面要强调一点,1对多查找中,如果没有其他的制定条件,那么别用Left join.(用2天测试出来的结果,请相信.)如果直接通过sql写,只有通过 where a.id=x.aid and x.bid=b.id; (=两边写法=) a inner join x on a.id=x.aid inner j... 阅读全文
posted @ 2014-01-25 18:08
NewObject_1
阅读(240)
评论(0)
推荐(0)

浙公网安备 33010602011771号