-->
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: Criteria queries on Set proprties?
PostPosted: Thu Jul 08, 2010 5:34 am 
Newbie

Joined: Thu Jul 08, 2010 5:20 am
Posts: 2
Is it possible to create a Criteria query against a property that is a many-to-one set mapping?

something like:

Code:
class Car { ... Set<Options> getBodyOptions (); ...}
class Option { ... }

Option chrome, sunRoof, moonRoof, towHitch; // many many more
Option [] searchOptions = { chrome, sunRoof };



I want to create a Criteria query which returns the set of all Cars such that car.getBodyOptions () contains any of the options in searchOptions.

Can this be done with a Criteria query or HQL?


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.