From: <one...@us...> - 2002-11-07 16:24:14
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html_single In directory usw-pr-cvs1:/tmp/cvs-serv26764/reference/html_single Modified Files: index.html Log Message: new faqs Index: index.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html_single/index.html,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** index.html 5 Nov 2002 13:40:54 -0000 1.76 --- index.html 7 Nov 2002 16:24:09 -0000 1.77 *************** *** 761,768 **** </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="or-mapping-s1-4b"></a>4.1.5. composite-id</h3></div></div><pre class="programlisting"><composite-id name="propertyName" ! class="className" unsaved-value="any|none|null"> ! <key-property name="propertyName" type="typename"/> ...... </composite-id></pre><p> --- 761,769 ---- </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="or-mapping-s1-4b"></a>4.1.5. composite-id</h3></div></div><pre class="programlisting"><composite-id name="propertyName" ! class="ClassName" unsaved-value="any|none|null"> ! <key-property name="propertyName" type="typename" column="column_name"/> ! <key-many-to-one name="propertyName class="ClassName" column="column_name"/> ...... </composite-id></pre><p> *************** *** 775,778 **** --- 776,782 ---- <property name="dependent"/> </composite-id></pre><p> + Your persistent class <span class="emphasis"><em>must</em></span> override <tt>equals()</tt> + and <tt>hashCode()</tt> to implement composite identifier equality. + </p><p> Unfortunately, this approach to composite identifiers means that a persistent object is its own identifier. There is no convenient "handle" other than the object itself. *************** *** 1038,1042 **** </set> <joined-subclass name="eg.DomesticCat"> ! <key column="CAT_ID"/> <property name="name" type="string"/> </joined-subclass> --- 1042,1046 ---- </set> <joined-subclass name="eg.DomesticCat"> ! <key column="CAT"/> <property name="name" type="string"/> </joined-subclass> |