-->
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: DetachedCriteria & Distinct on a table not just a proper
PostPosted: Sat Apr 29, 2006 9:04 pm 
Newbie

Joined: Sun Mar 05, 2006 7:36 pm
Posts: 4
Hi

I try to figure out how to use the distinct projection object with the DetachedCriteria on a table and not just a column(property) of a table.

For a property it would be like this:

Code:
Criteria cr = session.createCriteria("hr.klopa.domain.FoodItem").setProjection(Projections.distinct(Projections.property("name")));


but how can I use the destinct feature on the whole table and not just on a property e.g. select distinct * from table

Any help is very much appreciated

Cheers
Rolf


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.