-->
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: Criterion with in clause
PostPosted: Mon Nov 07, 2005 2:42 pm 
Newbie

Joined: Wed Dec 22, 2004 12:06 am
Posts: 2
I am attempting to create an in clause via the Criterion api -

I am trying to replicate the functionality possible with the following HQL:

select a from A as a where
:param in a.collectionProperty1OfA.propetyOnCollectionObj or
:param in a.collectionProperty2OfA.propetyOnCollectionObj

When translating that to Criteria, it seems that everything is possible except for the "in".

The Restrictions exposed in - but as a property and a set of known values. I need the other way around.

Two questions:

1) Is this possible given the current API - if so, any pointers would be appreciated.
2) If not, is this possible by implementing a custom criterion?

Thanks


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.