Hibernate Filters - VI
30 August 2008After defining a filter, it might be attached to multiple entities and/or collections and each will have its own condition. Yes, it is tedious when the conditions are the same each time and you have to repeat the condition.
Use
<filter-def name="myFilter" condition="abc > xyz">...</filter-def> <filter-def name="myOtherFilter">abc=xyz</filter-def>
Now whenever you attach a filter to something without specifying a condition, this default condition will be used. You may overrides the default condition if you provide a specific condition as part of the attachment of the filter.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Hibernate Filters - VI