minor
git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@5837 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
4ccd277fdc
commit
bf711fa2dc
|
@ -362,11 +362,13 @@ alter table line_items
|
||||||
<title>"Typed" one-to-one association</title>
|
<title>"Typed" one-to-one association</title>
|
||||||
<programlisting><![CDATA[<class name="Person">
|
<programlisting><![CDATA[<class name="Person">
|
||||||
<id name="name"/>
|
<id name="name"/>
|
||||||
<one-to-one name="address" cascade="all" constrained="false">
|
<one-to-one name="address"
|
||||||
|
cascade="all">
|
||||||
<formula>name</formula>
|
<formula>name</formula>
|
||||||
<formula>'HOME'</formula>
|
<formula>'HOME'</formula>
|
||||||
</one-to-one>
|
</one-to-one>
|
||||||
<one-to-one name="mailingAddress" constrained="false">
|
<one-to-one name="mailingAddress"
|
||||||
|
cascade="all">
|
||||||
<formula>name</formula>
|
<formula>name</formula>
|
||||||
<formula>'MAILING'</formula>
|
<formula>'MAILING'</formula>
|
||||||
</one-to-one>
|
</one-to-one>
|
||||||
|
@ -399,8 +401,8 @@ alter table line_items
|
||||||
<property name="address" not-null="true" length="200"/>
|
<property name="address" not-null="true" length="200"/>
|
||||||
|
|
||||||
<list name="orders"
|
<list name="orders"
|
||||||
inverse="true"
|
inverse="true"
|
||||||
cascade="save-update">
|
cascade="save-update">
|
||||||
<key column="customerId"/>
|
<key column="customerId"/>
|
||||||
<index column="orderNumber"/>
|
<index column="orderNumber"/>
|
||||||
<one-to-many class="Order"/>
|
<one-to-many class="Order"/>
|
||||||
|
@ -413,14 +415,14 @@ alter table line_items
|
||||||
<synchronize table="Product"/>
|
<synchronize table="Product"/>
|
||||||
|
|
||||||
<composite-id name="id"
|
<composite-id name="id"
|
||||||
class="Order$Id">
|
class="Order$Id">
|
||||||
<key-property name="customerId" length="10"/>
|
<key-property name="customerId" length="10"/>
|
||||||
<key-property name="orderNumber"/>
|
<key-property name="orderNumber"/>
|
||||||
</composite-id>
|
</composite-id>
|
||||||
|
|
||||||
<property name="orderDate"
|
<property name="orderDate"
|
||||||
type="calendar_date"
|
type="calendar_date"
|
||||||
not-null="true"/>
|
not-null="true"/>
|
||||||
|
|
||||||
<property name="total">
|
<property name="total">
|
||||||
<formula>
|
<formula>
|
||||||
|
@ -433,15 +435,15 @@ alter table line_items
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
<many-to-one name="customer"
|
<many-to-one name="customer"
|
||||||
column="customerId"
|
column="customerId"
|
||||||
insert="false"
|
insert="false"
|
||||||
update="false"
|
update="false"
|
||||||
not-null="true"/>
|
not-null="true"/>
|
||||||
|
|
||||||
<bag name="lineItems"
|
<bag name="lineItems"
|
||||||
fetch="join"
|
fetch="join"
|
||||||
inverse="true"
|
inverse="true"
|
||||||
cascade="save-update">
|
cascade="save-update">
|
||||||
<key>
|
<key>
|
||||||
<column name="customerId"/>
|
<column name="customerId"/>
|
||||||
<column name="orderNumber"/>
|
<column name="orderNumber"/>
|
||||||
|
@ -454,7 +456,7 @@ alter table line_items
|
||||||
<class name="LineItem">
|
<class name="LineItem">
|
||||||
|
|
||||||
<composite-id name="id"
|
<composite-id name="id"
|
||||||
class="LineItem$Id">
|
class="LineItem$Id">
|
||||||
<key-property name="customerId" length="10"/>
|
<key-property name="customerId" length="10"/>
|
||||||
<key-property name="orderNumber"/>
|
<key-property name="orderNumber"/>
|
||||||
<key-property name="productId" length="10"/>
|
<key-property name="productId" length="10"/>
|
||||||
|
@ -463,18 +465,18 @@ alter table line_items
|
||||||
<property name="quantity"/>
|
<property name="quantity"/>
|
||||||
|
|
||||||
<many-to-one name="order"
|
<many-to-one name="order"
|
||||||
insert="false"
|
insert="false"
|
||||||
update="false"
|
update="false"
|
||||||
not-null="true">
|
not-null="true">
|
||||||
<column name="customerId"/>
|
<column name="customerId"/>
|
||||||
<column name="orderNumber"/>
|
<column name="orderNumber"/>
|
||||||
</many-to-one>
|
</many-to-one>
|
||||||
|
|
||||||
<many-to-one name="product"
|
<many-to-one name="product"
|
||||||
insert="false"
|
insert="false"
|
||||||
update="false"
|
update="false"
|
||||||
not-null="true"
|
not-null="true"
|
||||||
column="productId"/>
|
column="productId"/>
|
||||||
|
|
||||||
</class>
|
</class>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue