From: <one...@us...> - 2002-11-19 10:42:21
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv22505/doc/reference/src Modified Files: basic_or_mapping.xml Log Message: added polymorphism attribute to <class> element Index: basic_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/basic_or_mapping.xml,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** basic_or_mapping.xml 16 Nov 2002 13:40:31 -0000 1.34 --- basic_or_mapping.xml 19 Nov 2002 10:42:18 -0000 1.35 *************** *** 94,97 **** --- 94,98 ---- schema="owner" proxy="ProxyInterface" + polymorphism="implicit|explicit" persister="PersisterClass" />]]></programlisting> *************** *** 133,141 **** <para> <literal>proxy</literal> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). If the class has no subclasses, you ! may specify the name of the class itself. </para> </listitem> ! <listitem> <para> <literal>persister</literal> (optional): Specifies a custom <literal>ClassPersister</literal>. --- 134,147 ---- <para> <literal>proxy</literal> (optional): Specifies an interface to use for lazy ! initializing proxies. You may specify the name of the class itself. </para> </listitem> ! <listitem> ! <para> ! <literal>polymorphism</literal> (optional, defaults to <literal>implicit</literal>): ! Determines whether implicit or explicit query polymorphism is used. ! </para> ! </listitem> ! <listitem> <para> <literal>persister</literal> (optional): Specifies a custom <literal>ClassPersister</literal>. *************** *** 162,165 **** --- 168,183 ---- </para> + <para><emphasis>Implicit</emphasis> polymorphism means that instances of the class will be returned + by a query that names any superclass or implemented interface or the class and that instances + of any subclass of the class will be returned by a query that names the class itself. + <emphasis>Explicit</emphasis> polymorphism means that class instances will be returned only + be queries that explicitly name that class and that queries that name the class will return + only instances of subclasses mapped inside this <literal><class></literal> declaration + as a <literal><subclass></literal> or <literal><joined-subclass></literal>. For + most purposes the default, <literal>polymorphism="implicit"</literal>, is appropriate. + Explicit polymorphism is useful when two different classes are mapped to the same table + (this allows a "lightweight" class that contains a subset of the table columns). + </para> + <para> The <literal>persister</literal> attribute lets you customize the persistence strategy used for *************** *** 873,878 **** <listitem> <para> ! <literal>proxy</literal> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). </para> </listitem> --- 891,896 ---- <listitem> <para> ! <literal>proxy</literal> (optional): Specifies a class or interface to use for ! lazy initializing proxies. </para> </listitem> *************** *** 914,919 **** <listitem> <para> ! <literal>proxy</literal> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). </para> </listitem> --- 932,937 ---- <listitem> <para> ! <literal>proxy</literal> (optional): Specifies a class or interface to use ! for lazy initializing proxies. </para> </listitem> |