From 908d22346fcc3965a5eb5adda518091fc5a27c80 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 3 Nov 2006 13:38:40 +0000 Subject: [PATCH] HHH-2127 : document default filter conditions git-svn-id: https://svn.jboss.org/repos/hibernate/branches/Branch_3_2/Hibernate3/doc@10705 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- reference/en/modules/filters.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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. + +