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
|