|
From: <one...@us...> - 2003-01-16 08:39:27
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src
In directory sc8-pr-cvs1:/tmp/cvs-serv18223/reference/src
Modified Files:
advanced_or_mapping.xml examples.xml
Log Message:
document change to inverse
Index: advanced_or_mapping.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/advanced_or_mapping.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** advanced_or_mapping.xml 16 Jan 2003 08:28:45 -0000 1.2
--- advanced_or_mapping.xml 16 Jan 2003 08:39:24 -0000 1.3
***************
*** 428,432 ****
You may specify a bidirectional many-to-many association simply by mapping two
nested, many-to-many sets/bags to the same database table and declaring one end as
! <emphasis>readonly</emphasis>. Heres an example of a bidirectional many-to-many
association from a class back to <emphasis>itself</emphasis>:
</para>
--- 428,432 ----
You may specify a bidirectional many-to-many association simply by mapping two
nested, many-to-many sets/bags to the same database table and declaring one end as
! <emphasis>inverse</emphasis>. Heres an example of a bidirectional many-to-many
association from a class back to <emphasis>itself</emphasis>:
</para>
***************
*** 439,443 ****
<many-to-many class="eg.Node" column="from_node_id"/>
</bag>
! <bag name="accessibleFrom" table="node_access" readonly="true" lazy="true"> <!-- readonly end -->
<key column="from_node_id"/>
<many-to-many class="eg.Node" column="to_node_id"/>
--- 439,443 ----
<many-to-many class="eg.Node" column="from_node_id"/>
</bag>
! <bag name="accessibleFrom" table="node_access" inverse="true" lazy="true"> <!-- inverse end -->
<key column="from_node_id"/>
<many-to-many class="eg.Node" column="to_node_id"/>
***************
*** 446,451 ****
<para>
! Changes made to the readonly end of the association are <emphasis>not</emphasis>
! persistent.
</para>
--- 446,451 ----
<para>
! Changes made only to the inverse end of the association are <emphasis>not</emphasis>
! persisted.
</para>
***************
*** 453,457 ****
You may map a bidirectional one-to-many association by mapping a nested,
one-to-many set / bag to the same table column(s) as a many-to-one association and
! declaring the many-valued end readonly.
</para>
--- 453,457 ----
You may map a bidirectional one-to-many association by mapping a nested,
one-to-many set / bag to the same table column(s) as a many-to-one association and
! declaring the many-valued end inverse.
</para>
***************
*** 459,463 ****
<id name="id" column="id"/>
....
! <set name="children" readonly="true" lazy="true">
<key column="parent_id"/>
<one-to-many class="eg.Child"/>
--- 459,463 ----
<id name="id" column="id"/>
....
! <set name="children" inverse="true" lazy="true">
<key column="parent_id"/>
<one-to-many class="eg.Child"/>
Index: examples.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/examples.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** examples.xml 16 Jan 2003 08:28:45 -0000 1.2
--- examples.xml 16 Jan 2003 08:39:24 -0000 1.3
***************
*** 143,147 ****
<property name="title"/>
! <set role="authors" table="author_work">
<key column="work_id" not-null="true"/>
<many-to-many class="Author" column="author_id" not-null="true"/>
--- 143,147 ----
<property name="title"/>
! <set name="authors" table="author_work">
<key column="work_id" not-null="true"/>
<many-to-many class="Author" column="author_id" not-null="true"/>
***************
*** 168,172 ****
<one-to-one name="person" constrained="true"/>
! <set role="works" table="author_work" readonly="true">
<key column="author_id"/>
<many-to-many class="Work" column="work_id"/>
--- 168,172 ----
<one-to-one name="person" constrained="true"/>
! <set name="works" table="author_work" readonly="true">
<key column="author_id"/>
<many-to-many class="Work" column="work_id"/>
***************
*** 257,261 ****
</id>
<property name="name"/>
! <set role="orders" readonly="true">
<key column="customer_id"/>
<one-to-many class="Order"/>
--- 257,261 ----
</id>
<property name="name"/>
! <set name="orders" readonly="true">
<key column="customer_id"/>
<one-to-many class="Order"/>
***************
*** 269,273 ****
<property name="date"/>
<many-to-one name="customer" column="customer_id"/>
! <list role="lineItems" table="line_items">
<key column="order_id"/>
<index column="line_number"/>
--- 269,273 ----
<property name="date"/>
<many-to-one name="customer" column="customer_id"/>
! <list name="lineItems" table="line_items">
<key column="order_id"/>
<index column="line_number"/>
|