diff --git a/reference/en/modules/filters.xml b/reference/en/modules/filters.xml index 05c79f1b42..b8270da003 100755 --- a/reference/en/modules/filters.xml +++ b/reference/en/modules/filters.xml @@ -7,7 +7,7 @@ enabled or disabled for a particular Hibernate session. - + Hibernate filters @@ -123,6 +123,23 @@ List results = session.createQuery("from Employee as e where e.salary > :targetS the operator. + + After being defined a filter might be attached to multiple entities and/or + collections each with its own condition. That can be tedious when the + conditions are the same each time. Thus <filter-def/> + allows defining a default condition, either as an attribute or CDATA: + + + xyz">... +abc=xyz]]> + + + This default condition will then be used whenever the filter is attached to something + without specifying a condition. Note that this means you can give a specific condition + as part of the attachment of the filter which overrides the default condition in that + particular case. + +