gavin wrote:
Use a Hibernate3 filter.
In the examples that I see, the filter is on a column that is part of the class (or collection).
like..
<class name="myClass" ...>
...
<filter name="myFilter" condition=":myFilterParam = MY_FILTERED_COLUMN"/>
</class>
or, to a collection:
<set ...>
<filter name="myFilter" condition=":myFilterParam = MY_FILTERED_COLUMN"/>
</set>
But, in our case, we want to use it like ":myFilterParam = returnObj.hasPermission()" instead of on a column of the class. I know this not straight forward from the DB point of view. like for each row, there is a logic that should retrieve data from other tables. Is this possible that I apply Hibernate3 filters based on this logic rather than on a column of the class?
Thanks,
Ravi.
P.S. Thanks Gavin, for that quick reply.