Hi There,
Have a nested createCriteria that results in bad SQL which results in a column ambigiously defined error from Oracle.
DetachedCriteria criteria = DetachedCriteria.forClass(A.class);
criteria.createCriteria("B").
createCriteria("C").add(Restrictions.in("type", mpTypeList ) ) ;
select count(*) as y0_ from A this_, B event1_, C monitoredp2_, C monitoredp2_ where this_.ID=event1_.ALARM_ID......
Notice the duplication is red font above i.e. it generates
C monitoredp2_ twice.
I think this is a bug? Does anyone know how to fix this? If I remove the second one it works ok.
|