From: <one...@us...> - 2003-04-19 03:34:38
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv27811/reference/src Modified Files: advanced_or_mapping.xml basic_or_mapping.xml Log Message: documented collection where attribute improved explanation of new import approach Index: advanced_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/advanced_or_mapping.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** advanced_or_mapping.xml 15 Apr 2003 09:28:51 -0000 1.16 --- advanced_or_mapping.xml 19 Apr 2003 03:34:34 -0000 1.17 *************** *** 125,128 **** --- 125,129 ---- <area id="mappingcollection7" coords="8 50"/> <area id="mappingcollection8" coords="9 50"/> + <area id="mappingcollection9" coords="10 50"/> </areaspec> <programlisting><![CDATA[<map *************** *** 134,138 **** cascade="all|none|save-update|delete" sort="unsorted|natural|comparatorClass" ! order-by="column_name asc|desc"> <key .... /> --- 135,140 ---- cascade="all|none|save-update|delete" sort="unsorted|natural|comparatorClass" ! order-by="column_name asc|desc" ! where="arbitrary sql where condition"> <key .... /> *************** *** 186,190 **** <literal>order-by</literal> (optional, JDK1.4 only) specify a table column (or columns) that define the iteration order of the <literal>Map</literal>, <literal>Set</literal> ! or bag, together with an optional <literal>asc</literal> or <literal>desc</literal>. </para> </callout> --- 188,199 ---- <literal>order-by</literal> (optional, JDK1.4 only) specify a table column (or columns) that define the iteration order of the <literal>Map</literal>, <literal>Set</literal> ! or bag, together with an optional <literal>asc</literal> or <literal>desc</literal> ! </para> ! </callout> ! <callout arearefs="mappingcollection9"> ! <para> ! <literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</literal> ! condition to be used when retrieving or removing the collection (useful if the ! collection should contain only a subset of the available data) </para> </callout> Index: basic_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/basic_or_mapping.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** basic_or_mapping.xml 11 Apr 2003 07:12:21 -0000 1.14 --- basic_or_mapping.xml 19 Apr 2003 03:34:34 -0000 1.15 *************** *** 112,116 **** </calloutlist> </programlistingco> ! </sect2> --- 112,121 ---- </calloutlist> </programlistingco> ! ! <para> ! If you have two persistent classes with the same (unqualified) name, you should set ! <literal>auto-import="false"</literal>. Hibernate will throw an exception if you attempt ! to assign two classes to the same "imported" name. ! </para> </sect2> *************** *** 599,606 **** --- 604,613 ---- <area id="discriminator1" coords="2 40"/> <area id="discriminator2" coords="3 40" /> + <area id="discriminator3" coords="4 40" /> </areaspec> <programlisting><![CDATA[<discriminator column="discriminator_column" type="discriminator_type" + force="true|false" />]]></programlisting> <calloutlist> *************** *** 617,620 **** --- 624,634 ---- </para> </callout> + <callout arearefs="discriminator3"> + <para> + <literal>force</literal> (optional - defaults to <literal>false</literal>) + "force" Hibernate to specify allowed discriminator values even when retrieving + all instances of the root class. + </para> + </callout> </calloutlist> </programlistingco> *************** *** 625,628 **** --- 639,648 ---- <literal><subclass></literal> elements. </para> + + <para> + The <literal>force</literal> attribute is (only) useful if the table contains rows with + "extra" discriminator values that are not mapped to a persistent class. This will not + usually be the case. + </para> </sect2> *************** *** 1206,1211 **** Suppose your application has two persistent classes with the same name, and you don't want to specify the fully qualified (package) name in Hibernate queries. Classes may be "imported" ! explicitly, rather than relying upon <literal>auto-import="true"</literal>. You may even import classes ! and interfaces that are not explicitly mapped. </para> --- 1226,1231 ---- Suppose your application has two persistent classes with the same name, and you don't want to specify the fully qualified (package) name in Hibernate queries. Classes may be "imported" ! explicitly, rather than relying upon <literal>auto-import="true"</literal>. You may even import ! classes and interfaces that are not explicitly mapped. </para> |