From: <one...@us...> - 2003-04-06 10:41:47
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv3447/reference/src Modified Files: basic_or_mapping.xml Log Message: updated for latest changes Index: basic_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/basic_or_mapping.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** basic_or_mapping.xml 30 Mar 2003 06:40:17 -0000 1.12 --- basic_or_mapping.xml 6 Apr 2003 10:41:43 -0000 1.13 *************** *** 414,418 **** <listitem> <para> ! Picks <literal>identity</literal>, <literal>sequence</literal> or <literal>hilo</literal> depending upon the capabilities of the underlying database. --- 414,418 ---- <listitem> <para> ! picks <literal>identity</literal>, <literal>sequence</literal> or <literal>hilo</literal> depending upon the capabilities of the underlying database. *************** *** 429,432 **** --- 429,441 ---- </listitem> </varlistentry> + <varlistentry> + <term><literal>foreign</literal></term> + <listitem> + <para> + uses the identifier of another associated object. Used in conjunction + with a <literal><one-to-one></literal> association. + </para> + </listitem> + </varlistentry> </variablelist> *************** *** 528,533 **** <programlisting><![CDATA[<composite-id> ! <property name="medicareNumber"/> ! <property name="dependent"/> </composite-id>]]></programlisting> --- 537,542 ---- <programlisting><![CDATA[<composite-id> ! <key-property name="medicareNumber"/> ! <key-property name="dependent"/> </composite-id>]]></programlisting> *************** *** 995,1003 **** <programlistingco> <areaspec> ! <area id="component1" coords="1 31"/> ! <area id="component2" coords="1 49"/> </areaspec> ! <programlisting><![CDATA[<component name="propertyName" class="className" > <property ...../> ........ </component>]]></programlisting> --- 1004,1020 ---- <programlistingco> <areaspec> ! <area id="component1" coords="2 33"/> ! <area id="component2" coords="3 33"/> ! <area id="component3" coords="4 33"/> ! <area id="component4" coords="5 33"/> </areaspec> ! <programlisting><![CDATA[<component ! name="propertyName" ! class="className" ! insert="true|false" ! upate="true|false"> ! <property ...../> + <many-to-one .... /> ........ </component>]]></programlisting> *************** *** 1014,1017 **** --- 1031,1046 ---- </para> </callout> + <callout arearefs="component3"> + <para> + <literal>insert</literal>: Do the mapped columns appear in SQL + <literal>INSERT</literal>s? + </para> + </callout> + <callout arearefs="component4"> + <para> + <literal>update</literal>: Do the mapped columns appear in SQL + <literal>UPDATE</literal>s? + </para> + </callout> </calloutlist> </programlistingco> *************** *** 1390,1415 **** <programlisting><![CDATA[package eg; ! import net.sf.hibernate.PersistentEnum; ! public class Color implements PersistentEnum { ! private final int code; ! private Color(int code) { ! this.code = code; ! } ! public static final Color TABBY = new Color(0); ! public static final Color GINGER = new Color(1); ! public static final Color BLACK = new Color(2); ! public int toInt() { return code; } ! public static Color fromInt(int code) { ! switch (code) { ! case 0: return TABBY; ! case 1: return GINGER; ! case 2: return BLACK; ! default: throw new RuntimeException("Unknown color code"); ! } ! } ! }]]></programlisting> <para> --- 1419,1444 ---- <programlisting><![CDATA[package eg; ! import net.sf.hibernate.PersistentEnum; ! public class Color implements PersistentEnum { ! private final int code; ! private Color(int code) { ! this.code = code; ! } ! public static final Color TABBY = new Color(0); ! public static final Color GINGER = new Color(1); ! public static final Color BLACK = new Color(2); ! public int toInt() { return code; } ! public static Color fromInt(int code) { ! switch (code) { ! case 0: return TABBY; ! case 1: return GINGER; ! case 2: return BLACK; ! default: throw new RuntimeException("Unknown color code"); ! } ! } ! }]]></programlisting> <para> *************** *** 1433,1441 **** <literal>FIRST_NAME</literal>, <literal>INITIAL</literal>, <literal>SURNAME</literal>. </para> <para> ! To implement a custom type, implement the interface <literal>net.sf.hibernate.UserType</literal> ! and simply declare properties using the fully qualified classname of the type. Check out ! <literal>net.sf.hibernate.test.DoubleStringType</literal> to see the kind of things ! that are possible. </para> --- 1462,1472 ---- <literal>FIRST_NAME</literal>, <literal>INITIAL</literal>, <literal>SURNAME</literal>. </para> + <para> ! To implement a custom type, implement either <literal>net.sf.hibernate.UserType</literal> ! or <literal>net.sf.hibernate.CompositeUserType</literal> and declare properties using the ! fully qualified classname of the type. Check out ! <literal>net.sf.hibernate.test.DoubleStringType</literal> to see the kind of things that ! are possible. </para> |