[hibernate-commits] Hibernate SVN: r10705 - branches/Branch_3_2/Hibernate3/doc/reference/en/modules

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Nov 3 08:38:41 EST 2006


Author: steve.ebersole at jboss.com
Date: 2006-11-03 08:38:40 -0500 (Fri, 03 Nov 2006)
New Revision: 10705

Modified:
   branches/Branch_3_2/Hibernate3/doc/reference/en/modules/filters.xml
Log:
HHH-2127 : document default filter conditions

Modified: branches/Branch_3_2/Hibernate3/doc/reference/en/modules/filters.xml
===================================================================
--- branches/Branch_3_2/Hibernate3/doc/reference/en/modules/filters.xml	2006-11-03 13:38:30 UTC (rev 10704)
+++ branches/Branch_3_2/Hibernate3/doc/reference/en/modules/filters.xml	2006-11-03 13:38:40 UTC (rev 10705)
@@ -7,7 +7,7 @@
         enabled or disabled for a particular Hibernate session.
     </para>
 
-    <sect1 id="objectstate-filters">
+    <sect1 id="objectstate-filters" revision="1">
         <title>Hibernate filters</title>
 
         <para>
@@ -123,6 +123,23 @@
             the operator.
         </para>
 
+        <para>
+            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 <literal>&lt;filter-def/&gt;</literal>
+            allows defining a default condition, either as an attribute or CDATA:
+        </para>
+
+        <programlisting><![CDATA[<filter-def name="myFilter" condition="abc > xyz">...</filter-def>
+<filter-def name="myOtherFilter">abc=xyz</filter-def>]]></programlisting>
+
+        <para>
+            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.
+        </para>
+
     </sect1>
 
 </chapter>




More information about the hibernate-commits mailing list