-->
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.  [ 2 posts ] 
Author Message
 Post subject: Select a distinct class in a criteria query?
PostPosted: Fri Mar 11, 2005 11:27 pm 
Regular
Regular

Joined: Tue Mar 01, 2005 2:35 pm
Posts: 60
Hibernate version:
3.0rc1

I would like to retrieve distinct objects from table A when joined to table B using the Criteria API. This is what it would look like in SQL:

SELECT DISTINCT a.*
FROM a INNER JOIN b ON ...
WHERE b.field ...

Is this possible? Thanks!


Top
 Profile  
 
 Post subject: distinct funtionality in Criteria API
PostPosted: Thu Apr 07, 2005 11:49 am 
Newbie

Joined: Mon May 10, 2004 5:45 pm
Posts: 9
So does the Criteria API support the 'distinct' sql functionality? If so, how do you use it? If not, when will it be implemented?


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

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.