-->
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: Querying an entity on multiple associations
PostPosted: Sat Dec 01, 2007 10:45 am 
Newbie

Joined: Sat Dec 01, 2007 10:37 am
Posts: 12
I am pretty new to hibernate and am having trouble working this out.

I want to query for an entity where that entity has multiple associations which I want to specify as the criteria. These associated entities are not necessarily exhaustive. IE. It may have more but as long as it has those specified return it.

Eg.
* from order where order has item 1 and order has item 2

I have tried using the criteria API by first creating a criteria on order, then an association criteria on item and adding both item example objects to the item criteria - No results.

If I add just 1 example item, it does return a result. I know about the disjunctions and conjunctions, but can't figure where they might fit in. Any suggestions please?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 02, 2007 11:17 am 
Newbie

Joined: Sat Dec 01, 2007 10:37 am
Posts: 12
I have to say, the replies column in the topics list on this forum makes for seriously depressing viewing.

It is rather strange that there are no 'eager experts' hanging around as would usually be the case for such a forum.

Anyway, I probably should have known better before posting but had hoped I would be one of the lucky ones.


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.