I'm trying to figure out the best way to provide a filtering to a collection-retrieval process. Imho, the filter/filter-dev combination is quite nice and basically what I need.
The only problem is, that one of the filters needs a variable list/set/array of inputs which I want to do via the SQL IN-operator.
I'd like to achieve something like this:
Code:
<filter-def name="documentType">
<filter-param name="documentTypeIDs" type="set" />
</filter-def>
<filter name="documentType" condition="documentTypeID IN (:documentTypeIDs)" />
But I can't figure out how to get that to work, the reference documentation and hibernate in action don't seem to mention this either. Nor was I able to find it using the forum's searchengine.
I've also tried specifying type="long" and simply supplying an array of Long's.
Actually, what I really'd like to achieve is a filter like this (using a Map orso), but that seems to be even more out of reach:
Code:
(documentID, documentTypeID) IN ((x1, y1), (x2, y2), ... )