-->
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: subquery problem
PostPosted: Wed Jul 05, 2006 9:53 am 
Newbie

Joined: Sat Mar 04, 2006 8:20 am
Posts: 6
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.1.rc2
Mapping documents:

Code between sessionFactory.openSession() and session.close():

DetachedCriteria techIDs = DetachedCriteria.forClass(Technologies.class)
.setProjection( Property.forName("techID") ).add( Property.forName("group").eq( group ) );

List test = session.createCriteria(AutoEval.class)
//.add( Subqueries.in("techID", techIDs) )
// .add( Property.forName("techID").eqAll(techIDs) )
.add( Subqueries.propertyEqAll("techID", techIDs) )
.list();

I used the below code to see if DetachedCriteria is corect :

Criteria criteria = techIDs.getExecutableCriteria(session);

list = criteria.list();

and it is.

Full stack trace of any exception that occurs:
no exception
Name and version of the database you are using:
mysql(last version)
The generated SQL (show_sql=true):
Hibernate:
select
this_.AutoEvalID as AutoEvalID10_0_,
this_.ApplicantID as Applican2_10_0_,
this_.TechID as TechID10_0_,
this_.AutoEval as AutoEval10_0_,
this_.RealEval as RealEval10_0_
from
employ.AutoEval this_
where
this_.TechID = all (
select
this0__.TechID as y0_
from
employ.Technologies this0__
where
this0__.Group=?
)
Debug level Hibernate log excerpt:


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.