[size=large]hql语句的from不支持子查询,where支持!
如: select a from A a,(select b from B b,C c where b.id=c.id) d
where a.id=d.id;
改为→select a from A a where a.id in (select b.id from B b,C c
where b.id=c.id);[/size]
如: select a from A a,(select b from B b,C c where b.id=c.id) d
where a.id=d.id;
改为→select a from A a where a.id in (select b.id from B b,C c
where b.id=c.id);[/size]