-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: nested createCriteria results in bad SQL - HB 3.1
PostPosted: Wed Feb 15, 2006 9:19 am 
Newbie

Joined: Wed Feb 15, 2006 8:36 am
Posts: 5
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.