|
From: <tu...@us...> - 2002-11-25 21:02:04
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html
In directory sc8-pr-cvs1:/tmp/cvs-serv31818/doc/reference/html
Modified Files:
adv-or-mapping.html architecture.html best-practices.html
examples.html index.html manipulating-data.html
or-mapping.html persistent-classes.html query-language.html
session-configuration.html transactions.html
Log Message:
Updated using the new style and scripts
Index: adv-or-mapping.html
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/adv-or-mapping.html,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** adv-or-mapping.html 21 Nov 2002 09:03:15 -0000 1.26
--- adv-or-mapping.html 25 Nov 2002 21:01:45 -0000 1.27
***************
*** 1,5 ****
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
! <title>Chapter 5. Advanced O/R Mapping</title><link rel="stylesheet" href="../style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.52.1"><link rel="home" href="index.html" title="Hibernate Reference Documentation"><link rel="up" href="index.html" title="Hibernate Reference Documentation"><link rel="previous" href="or-mapping.html" title="Chapter 4. Basic O/R Mapping"><link rel="next" href="manipulating-data.html" title="Chapter 6. Manipulating Persistent Data"><link rel="chapter" href="architecture.html" title="Chapter 1. Architecture"><link rel="chapter" href="session-configuration.html" title="Chapter 2. SessionFactory Configuration"><link rel="chapter" href="persistent-classes.html" title="Chapter 3. Persistent Classes"><link rel="chapter" href="or-mapping.html" title="Chapter 4. Basic O/R Mapping"><link rel="chapter" href="adv-or-mapping.html" title="Chapter 5. Advanced O/R Mapping"><link rel="chapter" href="manipulating-data.html" title="Chapter 6. Manipulating Persistent Data"><link rel="chapter" href="query-language.html" title="Chapter 7. Hibernate Query Language"><link rel="chapter" href="transactions.html" title="Chapter 8. Transactions And Concurrency"><link rel="chapter" href="examples.html" title="Chapter 9. Examples"><link rel="chapter" href="best-practices.html" title="Chapter 10. Best Practices"><link rel="section" href="adv-or-mapping.html#adv-or-mapping-s1" title="5.1. Collections"><link rel="section" href="adv-or-mapping.html#adv-or-mapping-s2" title="5.2. Components"><link rel="section" href="adv-or-mapping.html#adv-or-mapping-s3" title="5.3. Cache"><link rel="section" href="adv-or-mapping.html#adv-or-mapping-s4" title="5.4. Proxies for Lazy Initialization"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Advanced O/R Mapping</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="or-mapping.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="manipulating-data.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="adv-or-mapping"></a>Chapter 5. Advanced O/R Mapping</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>5.1. <a href="adv-or-mapping.html#adv-or-mapping-s1">Collections</a></dt><dd><dl><dt>5.1.1. <a href="adv-or-mapping.html#adv-or-mapping-s1-1">Persistent Collection Styles</a></dt><dt>5.1.2. <a href="adv-or-mapping.html#adv-or-mapping-s1-2">Toplevel and Nested Collections</a></dt><dt>5.1.3. <a href="adv-or-mapping.html#adv-or-mapping-s1-3">Mapping a Collection</a></dt><dt>5.1.4. <a href="adv-or-mapping.html#adv-or-mapping-s1-4">Mapping a Property to a Toplevel Collection</a></dt><dt>5.1.5. <a href="adv-or-mapping.html#adv-or-mapping-s1-5">Collections of Values and Many To Many Associations</a></dt><dt>5.1.6. <a href="adv-or-mapping.html#adv-or-mapping-s1-6">One To Many Associations</a></dt><dt>5.1.7. <a href="adv-or-mapping.html#adv-or-mapping-s1-7">Lazy Initialization</a></dt><dt>5.1.8. <a href="adv-or-mapping.html#adv-or-mapping-s1-8">Sorted Collections</a></dt><dt>5.1.9. <a href="adv-or-mapping.html#adv-or-mapping-s1-9">Garbage Collection</a></dt><dt>5.1.10. <a href="adv-or-mapping.html#adv-or-mapping-s1-10">Bidirectional Associations</a></dt><dt>5.1.11. <a href="adv-or-mapping.html#adv-or-mapping-s1-11">Ternary Associations</a></dt><dt>5.1.12. <a href="adv-or-mapping.html#adv-or-mapping-s1-12">Collection Example</a></dt></dl></dd><dt>5.2. <a href="adv-or-mapping.html#adv-or-mapping-s2">Components</a></dt><dd><dl><dt>5.2.1. <a href="adv-or-mapping.html#adv-or-mapping-s2-1">As Dependent Objects</a></dt><dt>5.2.2. <a href="adv-or-mapping.html#adv-or-mapping-s2-2">In Collections</a></dt><dt>5.2.3. <a href="adv-or-mapping.html#adv-or-mapping-s2-2b">As a Map Index</a></dt><dt>5.2.4. <a href="adv-or-mapping.html#adv-or-mapping-s2-3">As Composite Identifiers</a></dt></dl></dd><dt>5.3. <a href="adv-or-mapping.html#adv-or-mapping-s3">Cache</a></dt><dd><dl><dt>5.3.1. <a href="adv-or-mapping.html#adv-or-mapping-s3-1">Mapping</a></dt><dt>5.3.2. <a href="adv-or-mapping.html#adv-or-mapping-s3-2">Read Only Cache</a></dt><dt>5.3.3. <a href="adv-or-mapping.html#adv-or-mapping-s3-3">Read / Write Cache</a></dt></dl></dd><dt>5.4. <a href="adv-or-mapping.html#adv-or-mapping-s4">Proxies for Lazy Initialization</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="adv-or-mapping-s1"></a>5.1. Collections</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>5.1.1. <a href="adv-or-mapping.html#adv-or-mapping-s1-1">Persistent Collection Styles</a></dt><dt>5.1.2. <a href="adv-or-mapping.html#adv-or-mapping-s1-2">Toplevel and Nested Collections</a></dt><dt>5.1.3. <a href="adv-or-mapping.html#adv-or-mapping-s1-3">Mapping a Collection</a></dt><dt>5.1.4. <a href="adv-or-mapping.html#adv-or-mapping-s1-4">Mapping a Property to a Toplevel Collection</a></dt><dt>5.1.5. <a href="adv-or-mapping.html#adv-or-mapping-s1-5">Collections of Values and Many To Many Associations</a></dt><dt>5.1.6. <a href="adv-or-mapping.html#adv-or-mapping-s1-6">One To Many Associations</a></dt><dt>5.1.7. <a href="adv-or-mapping.html#adv-or-mapping-s1-7">Lazy Initialization</a></dt><dt>5.1.8. <a href="adv-or-mapping.html#adv-or-mapping-s1-8">Sorted Collections</a></dt><dt>5.1.9. <a href="adv-or-mapping.html#adv-or-mapping-s1-9">Garbage Collection</a></dt><dt>5.1.10. <a href="adv-or-mapping.html#adv-or-mapping-s1-10">Bidirectional Associations</a></dt><dt>5.1.11. <a href="adv-or-mapping.html#adv-or-mapping-s1-11">Ternary Associations</a></dt><dt>5.1.12. <a href="adv-or-mapping.html#adv-or-mapping-s1-12">Collection Example</a></dt></dl></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-1"></a>5.1.1. Persistent Collection Styles</h3></div></div><p>
This section does not contain much example Java code. We assume you already know
how to use Java's collections framework. If so, theres not really anything more
--- 1,5 ----
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
! <title>Chapter 5. Advanced O/R Mapping</title><link rel="stylesheet" href="'../style.css'" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.49"><link rel="home" href="index.html" title="Hibernate Reference Documentation"><link rel="up" href="index.html" title="Hibernate Reference Documentation"><link rel="previous" href="or-mapping.html" title="Chapter 4. Basic O/R Mapping"><link rel="next" href="manipulating-data.html" title="Chapter 6. Manipulating Persistent Data"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Advanced O/R Mapping</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="or-mapping.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="manipulating-data.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="adv-or-mapping"></a>Chapter 5. Advanced O/R Mapping</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="adv-or-mapping.html#adv-or-mapping-s1">Collections</a></dt><dd><dl><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-1">Persistent Collection Styles</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-2">Toplevel and Nested Collections</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-3">Mapping a Collection</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-4">Mapping a Property to a Toplevel Collection</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-5">Collections of Values and Many To Many Associations</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-6">One To Many Associations</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-7">Lazy Initialization</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-8">Sorted Collections</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-9">Garbage Collection</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-10">Bidirectional Associations</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-11">Ternary Associations</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s1-12">Collection Example</a></dt></dl></dd><dt><a href="adv-or-mapping.html#adv-or-mapping-s2">Components</a></dt><dd><dl><dt><a href="adv-or-mapping.html#adv-or-mapping-s2-1">As Dependent Objects</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s2-2">In Collections</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s2-2b">As a Map Index</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s2-3">As Composite Identifiers</a></dt></dl></dd><dt><a href="adv-or-mapping.html#adv-or-mapping-s3">Cache</a></dt><dd><dl><dt><a href="adv-or-mapping.html#adv-or-mapping-s3-1">Mapping</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s3-2">Read Only Cache</a></dt><dt><a href="adv-or-mapping.html#adv-or-mapping-s3-3">Read / Write Cache</a></dt></dl></dd><dt><a href="adv-or-mapping.html#adv-or-mapping-s4">Proxies for Lazy Initialization</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="adv-or-mapping-s1"></a>Collections</h2></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-1"></a>Persistent Collection Styles</h3></div></div><p>
This section does not contain much example Java code. We assume you already know
how to use Java's collections framework. If so, theres not really anything more
***************
*** 47,51 ****
</p><p>
Collections may contain any other Hibernate type. All collection types except
! <tt>Set</tt> and bag have an <span class="emphasis"><em>index</em></span> - an array or list
index or map key. The index of a <tt>Map</tt> may be of any basic type, an
entity type or even a composite type (it may not be a collection).
--- 47,51 ----
</p><p>
Collections may contain any other Hibernate type. All collection types except
! <tt>Set</tt> and bag have an <span class="emphasis"><i>index</i></span> - an array or list
index or map key. The index of a <tt>Map</tt> may be of any basic type, an
entity type or even a composite type (it may not be a collection).
***************
*** 55,62 ****
schema generation tool to get a feeling for how various mapping declarations
translate to database tables.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-2"></a>5.1.2. Toplevel and Nested Collections</h3></div></div><p>
All collections require an identifier. The identifier is never exposed to the
! application. A <span class="emphasis"><em>nested</em></span> collection is one whose identifier
! is assigned from its containing object. A <span class="emphasis"><em>toplevel</em></span>
collection's identifier is generated by a Hibernate ID generator. Toplevel
collections require an extra column in the table of the owning class (holding
--- 55,62 ----
schema generation tool to get a feeling for how various mapping declarations
translate to database tables.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-2"></a>Toplevel and Nested Collections</h3></div></div><p>
All collections require an identifier. The identifier is never exposed to the
! application. A <span class="emphasis"><i>nested</i></span> collection is one whose identifier
! is assigned from its containing object. A <span class="emphasis"><i>toplevel</i></span>
collection's identifier is generated by a Hibernate ID generator. Toplevel
collections require an extra column in the table of the owning class (holding
***************
*** 67,71 ****
The role name is the name of a property of that class or component and collections
of that role may only be referenced by that property. This is intended to be the
! most common use of collections. However, nested collections may <span class="emphasis"><em>not</em></span>
be contained in other collections.....Hibernate won't even let you declare such
a mapping. Nested collections do not distinguish between a null collection
--- 67,71 ----
The role name is the name of a property of that class or component and collections
of that role may only be referenced by that property. This is intended to be the
! most common use of collections. However, nested collections may <span class="emphasis"><i>not</i></span>
be contained in other collections.....Hibernate won't even let you declare such
a mapping. Nested collections do not distinguish between a null collection
***************
*** 77,81 ****
<tt>native</tt> ID generation). Toplevel collections
may be contained in other collections.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-3"></a>5.1.3. Mapping a Collection</h3></div></div><p>
Collections are declared by the
<tt><set></tt>,
--- 77,81 ----
<tt>native</tt> ID generation). Toplevel collections
may be contained in other collections.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-3"></a>Mapping a Collection</h3></div></div><p>
Collections are declared by the
<tt><set></tt>,
***************
*** 121,125 ****
that define the iteration order of the <tt>Map</tt>, <tt>Set</tt>
or bag, together with an optional <tt>asc</tt> or <tt>desc</tt>.
! </p></li></ul></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-4"></a>5.1.4. Mapping a Property to a Toplevel Collection</h3></div></div><p>
The <tt><collection></tt> and
<tt><subcollection></tt> elements map a property to a
--- 121,125 ----
that define the iteration order of the <tt>Map</tt>, <tt>Set</tt>
or bag, together with an optional <tt>asc</tt> or <tt>desc</tt>.
! </p></li></ul></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-4"></a>Mapping a Property to a Toplevel Collection</h3></div></div><p>
The <tt><collection></tt> and
<tt><subcollection></tt> elements map a property to a
***************
*** 145,157 ****
Note that enabling cascades for a collection will force operations to cascade
all the way down a heirarchy of subcollections to the leaf entity objects.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-5"></a>5.1.5. Collections of Values and Many To Many Associations</h3></div></div><p>
Most collection roles require a table of their own. This includes any collection
of values and any collection of entities that has the natural semantics for a
Java collection. The table requires an identifier column, an element column (or
! column<span class="emphasis"><em>s</em></span> if it is a collection of components) and possibly
an index column.
</p><p>
A collection of entities with its own table corresponds to the relational notion
! of <span class="emphasis"><em>many-to-many association</em></span>. A many to many association is the
most natural mapping of a Java collection but is not always the best relational model.
</p><p>
--- 145,157 ----
Note that enabling cascades for a collection will force operations to cascade
all the way down a heirarchy of subcollections to the leaf entity objects.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-5"></a>Collections of Values and Many To Many Associations</h3></div></div><p>
Most collection roles require a table of their own. This includes any collection
of values and any collection of entities that has the natural semantics for a
Java collection. The table requires an identifier column, an element column (or
! column<span class="emphasis"><i>s</i></span> if it is a collection of components) and possibly
an index column.
</p><p>
A collection of entities with its own table corresponds to the relational notion
! of <span class="emphasis"><i>many-to-many association</i></span>. A many to many association is the
most natural mapping of a Java collection but is not always the best relational model.
</p><p>
***************
*** 198,205 ****
<property name="serialNumber" column="serial_no" type="string"/>
</composite-element>
! </list></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-6"></a>5.1.6. One To Many Associations</h3></div></div><p>
! A <span class="emphasis"><em>one to many association</em></span> links the tables of two classes
! <span class="emphasis"><em>directly</em></span>, with no intervening collection table.
! (This implements a <span class="emphasis"><em>one-to-many</em></span> relational
model.) This model has higher performance but loses some of the semantics of
Java collections:
--- 198,205 ----
<property name="serialNumber" column="serial_no" type="string"/>
</composite-element>
! </list></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-6"></a>One To Many Associations</h3></div></div><p>
! A <span class="emphasis"><i>one to many association</i></span> links the tables of two classes
! <span class="emphasis"><i>directly</i></span>, with no intervening collection table.
! (This implements a <span class="emphasis"><i>one-to-many</i></span> relational
model.) This model has higher performance but loses some of the semantics of
Java collections:
***************
*** 228,232 ****
The <tt>one-to-many</tt> tag does not need to declare
any columns.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-7"></a>5.1.7. Lazy Initialization</h3></div></div><p>
Collections (other than arrays) may be lazily initialized, meaning they load
their state from the database only when the application needs to access it.
--- 228,232 ----
The <tt>one-to-many</tt> tag does not need to declare
any columns.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-7"></a>Lazy Initialization</h3></div></div><p>
Collections (other than arrays) may be lazily initialized, meaning they load
their state from the database only when the application needs to access it.
***************
*** 259,263 ****
<key column="group_id"/>
<element column="NAME" type="string"/>
! </set></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-8"></a>5.1.8. Sorted Collections</h3></div></div><p>
Hibernate supports collections implementing
<tt>java.util.SortedMap</tt> and
--- 259,263 ----
<key column="group_id"/>
<element column="NAME" type="string"/>
! </set></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-8"></a>Sorted Collections</h3></div></div><p>
Hibernate supports collections implementing
<tt>java.util.SortedMap</tt> and
***************
*** 277,281 ****
Sorted collections actually behave like <tt>java.util.TreeSet</tt> or
<tt>java.util.TreeMap</tt>.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-9"></a>5.1.9. Garbage Collection</h3></div></div><p>
Collections are automatically persisted when referenced by a persistent object
and automatically deleted when unreferenced. If a collection is passed from one
--- 277,281 ----
Sorted collections actually behave like <tt>java.util.TreeSet</tt> or
<tt>java.util.TreeMap</tt>.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-9"></a>Garbage Collection</h3></div></div><p>
Collections are automatically persisted when referenced by a persistent object
and automatically deleted when unreferenced. If a collection is passed from one
***************
*** 283,299 ****
another. You shouldn't have to worry much about any of this. Just use
Hibernate's collections the same way you use ordinary Java collections.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-10"></a>5.1.10. Bidirectional Associations</h3></div></div><p>
! A <span class="emphasis"><em>bidirectional association</em></span> allows navigation from both
"ends" of the association. Two kinds of bidirectional association are
supported:
</p><div class="variablelist"><dl><dt><span class="term">one-to-many</span></dt><dd><p>
Set valued at one end, single-valued at the other
! </p></dd><br><dt><span class="term">many-to-many</span></dt><dd><p>
Set / bag valued at both ends
! </p></dd><br></dl></div><p>
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
! <span class="emphasis"><em>readonly</em></span>. Heres an example of a bidirectional many-to-many
! association from a class back to <span class="emphasis"><em>itself</em></span>:
</p><pre class="programlisting"><class name="eg.Node">
<id name="id" column="id"/>
--- 283,299 ----
another. You shouldn't have to worry much about any of this. Just use
Hibernate's collections the same way you use ordinary Java collections.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-10"></a>Bidirectional Associations</h3></div></div><p>
! A <span class="emphasis"><i>bidirectional association</i></span> allows navigation from both
"ends" of the association. Two kinds of bidirectional association are
supported:
</p><div class="variablelist"><dl><dt><span class="term">one-to-many</span></dt><dd><p>
Set valued at one end, single-valued at the other
! </p></dd><dt><span class="term">many-to-many</span></dt><dd><p>
Set / bag valued at both ends
! </p></dd></dl></div><p>
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
! <span class="emphasis"><i>readonly</i></span>. Heres an example of a bidirectional many-to-many
! association from a class back to <span class="emphasis"><i>itself</i></span>:
</p><pre class="programlisting"><class name="eg.Node">
<id name="id" column="id"/>
***************
*** 308,312 ****
</bag>
</class></pre><p>
! Changes made to the readonly end of the association are <span class="emphasis"><em>not</em></span>
persistent.
</p><p>
--- 308,312 ----
</bag>
</class></pre><p>
! Changes made to the readonly end of the association are <span class="emphasis"><i>not</i></span>
persistent.
</p><p>
***************
*** 327,331 ****
....
<many-to-one name="parent" class="eg.Parent" column="parent_id"/>
! </class></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-11"></a>5.1.11. Ternary Associations</h3></div></div><p>
There are two possible approaches to mapping a ternary association. One approach is to use
composite elements (discussed below). Another is to use a <tt>Map</tt> with an
--- 327,331 ----
....
<many-to-one name="parent" class="eg.Parent" column="parent_id"/>
! </class></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-11"></a>Ternary Associations</h3></div></div><p>
There are two possible approaches to mapping a ternary association. One approach is to use
composite elements (discussed below). Another is to use a <tt>Map</tt> with an
***************
*** 339,343 ****
<index-many-to-many column="node2_id" class="Node"/>
<many-to-many column="connection_id" class="Connection"/>
! </map></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-12"></a>5.1.12. Collection Example</h3></div></div><p>
The previous sections are pretty confusing. So lets look at an example. This
class:
--- 339,343 ----
<index-many-to-many column="node2_id" class="Node"/>
<many-to-many column="connection_id" class="Connection"/>
! </map></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s1-12"></a>Collection Example</h3></div></div><p>
The previous sections are pretty confusing. So lets look at an example. This
class:
***************
*** 439,444 ****
create table child ( id bigint not null primary key, name varchar(255) )
create table childset ( id bigint, child_id bigint )
! alter table childset add constraint childsetfk0 (child_id) references child</pre></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="adv-or-mapping-s2"></a>5.2. Components</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>5.2.1. <a href="adv-or-mapping.html#adv-or-mapping-s2-1">As Dependent Objects</a></dt><dt>5.2.2. <a href="adv-or-mapping.html#adv-or-mapping-s2-2">In Collections</a></dt><dt>5.2.3. <a href="adv-or-mapping.html#adv-or-mapping-s2-2b">As a Map Index</a></dt><dt>5.2.4. <a href="adv-or-mapping.html#adv-or-mapping-s2-3">As Composite Identifiers</a></dt></dl></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-1"></a>5.2.1. As Dependent Objects</h3></div></div><p>
! A <span class="emphasis"><em>component</em></span> is a contained object persisted to the same
table as its owner. The term "component" refers to the object-oriented notion
of composition (not to architecture-level components). For example, you might
--- 439,444 ----
create table child ( id bigint not null primary key, name varchar(255) )
create table childset ( id bigint, child_id bigint )
! alter table childset add constraint childsetfk0 (child_id) references child</pre></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="adv-or-mapping-s2"></a>Components</h2></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-1"></a>As Dependent Objects</h3></div></div><p>
! A <span class="emphasis"><i>component</i></span> is a contained object persisted to the same
table as its owner. The term "component" refers to the object-oriented notion
of composition (not to architecture-level components). For example, you might
***************
*** 516,520 ****
</p><p>
Like all value types, components do not support shared references. The null
! value semantics of a component are <span class="emphasis"><em>ad hoc</em></span>. When reloading the
containing object, Hibernate will assume that if all component columns are
null, then the entire component is null. This should be okay for most purposes.
--- 516,520 ----
</p><p>
Like all value types, components do not support shared references. The null
! value semantics of a component are <span class="emphasis"><i>ad hoc</i></span>. When reloading the
containing object, Hibernate will assume that if all component columns are
null, then the entire component is null. This should be okay for most purposes.
***************
*** 522,526 ****
The properties of a component may be of any Hibernate type (nested and toplevel
collections, many-to-one associations, other components, etc). Nested components
! should <span class="emphasis"><em>not</em></span> be considered an exotic usage. Hibernate is intended
to support a very fine-grained object model.
</p><p>
--- 522,526 ----
The properties of a component may be of any Hibernate type (nested and toplevel
collections, many-to-one associations, other components, etc). Nested components
! should <span class="emphasis"><i>not</i></span> be considered an exotic usage. Hibernate is intended
to support a very fine-grained object model.
</p><p>
***************
*** 528,532 ****
subelement that maps a property of the component class as a reference back to the
containing entity.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-2"></a>5.2.2. In Collections</h3></div></div><p>
Collections of components are supported (eg. an array of type
<tt>Name</tt>). Declare your component collection by
--- 528,532 ----
subelement that maps a property of the component class as a reference back to the
containing entity.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-2"></a>In Collections</h3></div></div><p>
Collections of components are supported (eg. an array of type
<tt>Name</tt>). Declare your component collection by
***************
*** 580,589 ****
</composite-element>
</set>
! </class></pre><p>Composite element properties may not appear in a query, unfortunately.</p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-2b"></a>5.2.3. As a Map Index</h3></div></div><p>
The <tt><composite-index></tt> element lets you map a
component class as the key of a <tt>Map</tt>. Make sure you override
<tt>hashCode()</tt> and <tt>equals()</tt> correctly on
the component class.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-3"></a>5.2.4. As Composite Identifiers</h3></div></div><p>
You may use a component as an identifier of an entity class. Your component
class must satisfy certain requirements:
--- 580,589 ----
</composite-element>
</set>
! </class></pre><p>Composite element properties may not appear in a query, unfortunately.</p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-2b"></a>As a Map Index</h3></div></div><p>
The <tt><composite-index></tt> element lets you map a
component class as the key of a <tt>Map</tt>. Make sure you override
<tt>hashCode()</tt> and <tt>equals()</tt> correctly on
the component class.
! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-3"></a>As Composite Identifiers</h3></div></div><p>
You may use a component as an identifier of an entity class. Your component
class must satisfy certain requirements:
***************
*** 646,650 ****
<element column="foo_date" type="date"/>
</set>
! </class></pre></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="adv-or-mapping-s3"></a>5.3. Cache</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>5.3.1. <a href="adv-or-mapping.html#adv-or-mapping-s3-1">Mapping</a></dt><dt>5.3.2. <a href="adv-or-mapping.html#adv-or-mapping-s3-2">Read Only Cache</a></dt><dt>5.3.3. <a href="adv-or-mapping.html#adv-or-mapping-s3-3">Read / Write Cache</a></dt></dl></div><p>
A Hibernate <tt>Session</tt> is a transaction-level cache of persistent data. It is
possible to configure a <tt>SessionFactory</tt>-level cache on a class-by-class
--- 646,650 ----
<element column="foo_date" type="date"/>
</set>
! </class></pre></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="adv-or-mapping-s3"></a>Cache</h2></div></div><p>
A Hibernate <tt>Session</tt> is a transaction-level cache of persistent data. It is
possible to configure a <tt>SessionFactory</tt>-level cache on a class-by-class
***************
*** 656,660 ****
exists but is now semi-deprecated. Please see the JCS documentation for information on how to
configure data expiry, in-memory caching, disk caching, etc.
! </p><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s3-1"></a>5.3.1. Mapping</h3></div></div><p>
The <tt><jcs-cache></tt> element of a class or collection mapping has the
following form:
--- 656,660 ----
exists but is now semi-deprecated. Please see the JCS documentation for information on how to
configure data expiry, in-memory caching, disk caching, etc.
! </p><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s3-1"></a>Mapping</h3></div></div><p>
The <tt><jcs-cache></tt> element of a class or collection mapping has the
following form:
***************
*** 663,667 ****
(<tt>read-write</tt>,
<tt>read-only</tt>)
! </p></li></ul></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s3-2"></a>5.3.2. Read Only Cache</h3></div></div><p>
If your application needs to read but never modify instances of a persistent class, a
<tt>read-only</tt> cache may be used. This is the only style of cache that
--- 663,667 ----
(<tt>read-write</tt>,
<tt>read-only</tt>)
! </p></li></ul></div></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s3-2"></a>Read Only Cache</h3></div></div><p>
If your application needs to read but never modify instances of a persistent class, a
<tt>read-only</tt> cache may be used. This is the only style of cache that
***************
*** 671,675 ****
....
<jcs-cache usage="read-only"/>
! </class></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s3-3"></a>5.3.3. Read / Write Cache</h3></div></div><p>
If the application occasionally needs to update data, a <tt>read-write</tt>
cache might be appropriate. This cache should never be used in a clustered environment
--- 671,675 ----
....
<jcs-cache usage="read-only"/>
! </class></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s3-3"></a>Read / Write Cache</h3></div></div><p>
If the application occasionally needs to update data, a <tt>read-write</tt>
cache might be appropriate. This cache should never be used in a clustered environment
***************
*** 687,691 ****
....
</set>
! </class></pre></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="adv-or-mapping-s4"></a>5.4. Proxies for Lazy Initialization</h2></div></div><p>
Hibernate implements lazy initializing proxies for persistent objects using runtime
bytecode enhancement.
--- 687,691 ----
....
</set>
! </class></pre></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="adv-or-mapping-s4"></a>Proxies for Lazy Initialization</h2></div></div><p>
Hibernate implements lazy initializing proxies for persistent objects using runtime
bytecode enhancement.
***************
*** 745,749 ****
type <tt>ICat</tt>, not <tt>Cat</tt>.
</p><p>
! Certain operations do <span class="emphasis"><em>not</em></span> require proxy initialization
</p><div class="itemizedlist"><ul type="disc"><li><p>
<tt>equals()</tt>, if the persistent class does not override
--- 745,749 ----
type <tt>ICat</tt>, not <tt>Cat</tt>.
</p><p>
! Certain operations do <span class="emphasis"><i>not</i></span> require proxy initialization
</p><div class="itemizedlist"><ul type="disc"><li><p>
<tt>equals()</tt>, if the persistent class does not override
***************
*** 763,765 ****
Exceptions that occur while initializing a proxy are wrapped in a
<tt>LazyInitializationException</tt>.
! </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="or-mapping.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="manipulating-data.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Basic O/R Mapping </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. Manipulating Persistent Data</td></tr></table></div></body></html>
\ No newline at end of file
--- 763,765 ----
Exceptions that occur while initializing a proxy are wrapped in a
<tt>LazyInitializationException</tt>.
! </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="or-mapping.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="manipulating-data.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Basic O/R Mapping </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. Manipulating Persistent Data</td></tr></table></div></body></html>
\ No newline at end of file
Index: architecture.html
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/architecture.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** architecture.html 27 Oct 2002 11:48:37 -0000 1.9
--- architecture.html 25 Nov 2002 21:01:46 -0000 1.10
***************
*** 1,5 ****
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
! <title>Chapter 1. Architecture</title><link rel="stylesheet" href="../style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.52.1"><link rel="home" href="index.html" title="Hibernate Reference Documentation"><link rel="up" href="index.html" title="Hibernate Reference Documentation"><link rel="previous" href="index.html" title="Hibernate Reference Documentation"><link rel="next" href="session-configuration.html" title="Chapter 2. SessionFactory Configuration"><link rel="chapter" href="architecture.html" title="Chapter 1. Architecture"><link rel="chapter" href="session-configuration.html" title="Chapter 2. SessionFactory Configuration"><link rel="chapter" href="persistent-classes.html" title="Chapter 3. Persistent Classes"><link rel="chapter" href="or-mapping.html" title="Chapter 4. Basic O/R Mapping"><link rel="chapter" href="adv-or-mapping.html" title="Chapter 5. Advanced O/R Mapping"><link rel="chapter" href="manipulating-data.html" title="Chapter 6. Manipulating Persistent Data"><link rel="chapter" href="query-language.html" title="Chapter 7. Hibernate Query Language"><link rel="chapter" href="transactions.html" title="Chapter 8. Transactions And Concurrency"><link rel="chapter" href="examples.html" title="Chapter 9. Examples"><link rel="chapter" href="best-practices.html" title="Chapter 10. Best Practices"><link rel="section" href="architecture.html#architecture-s1" title="1.1. Overview"><link rel="section" href="architecture.html#architecture-s2" title="1.2. Persistent Object Identity"><link rel="section" href="architecture.html#architecture-s3" title="1.3. JMX Integration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Architecture</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="session-configuration.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="architecture"></a>Chapter 1. Architecture</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>1.1. <a href="architecture.html#architecture-s1">Overview</a></dt><dt>1.2. <a href="architecture.html#architecture-s2">Persistent Object Identity</a></dt><dt>1.3. <a href="architecture.html#architecture-s3">JMX Integration</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="architecture-s1"></a>1.1. Overview</h2></div></div><p>
A (very) high-level view of the Hibernate architecture:
</p><div class="mediaobject"><img src="../images/overview.gif" align="center"></div><p>
--- 1,5 ----
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
! <title>Chapter 1. Architecture</title><link rel="stylesheet" href="'../style.css'" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.49"><link rel="home" href="index.html" title="Hibernate Reference Documentation"><link rel="up" href="index.html" title="Hibernate Reference Documentation"><link rel="previous" href="index.html" title="Hibernate Reference Documentation"><link rel="next" href="session-configuration.html" title="Chapter 2. SessionFactory Configuration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Architecture</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="session-configuration.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="architecture"></a>Chapter 1. Architecture</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="architecture.html#architecture-s1">Overview</a></dt><dt><a href="architecture.html#architecture-s2">Persistent Object Identity</a></dt><dt><a href="architecture.html#architecture-s3">JMX Integration</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="architecture-s1"></a>Overview</h2></div></div><p>
A (very) high-level view of the Hibernate architecture:
</p><div class="mediaobject"><img src="../images/overview.gif" align="center"></div><p>
***************
*** 34,69 ****
A threadsafe (immutable) cache of compiled mappings. A factory for
<tt>Session</tt>. A client of <tt>ConnectionProvider</tt>.
! </p></dd><br><dt><span class="term">Session</span></dt><dd><p>
A single-threaded, short-lived object representing a conversation between
the application and the persistent store. Wraps a JDBC connection. Factory
for <tt>Transaction</tt>. Manages persistent objects to the
application.
! </p></dd><br><dt><span class="term">Persistent Objects and Collections</span></dt><dd><p>
Short-lived, single threaded objects containing persistent state and business
function. These might be ordinary JavaBeans, the only special thing about them
is that they are currently associated with (exactly one)
<tt>Session</tt>.
! </p></dd><br><dt><span class="term">Transient Objects and Collections</span></dt><dd><p>
Instances of persistent classes that are not currently associated with a
<tt>Session</tt>. They may have been instantiated by
the application and not (yet) persisted or they may have been instantiated by a
closed <tt>Session</tt>.
! </p></dd><br><dt><span class="term">Transaction</span></dt><dd><p>
( Optional ) A single-threaded, short-lived object used by the application to
specify atomic units of work. Abstracts application from underlying JDBC,
JTA or CORBA transaction. A <tt>Session</tt> might span several
<tt>Transaction</tt>s.
! </p></dd><br><dt><span class="term">ConnectionProvider</span></dt><dd><p>
( Optional ) A factory for JDBC connections. Abstracts application from
underlying <tt>Datasource</tt> or <tt>DriverManager</tt>.
Not exposed to application.
! </p></dd><br><dt><span class="term">TransactionFactory</span></dt><dd><p>
( Optional ) A factory for <tt>Transaction</tt>. Not exposed to the
application.
! </p></dd><br></dl></div><p>
Given a "lite" architecture, the application bypasses the
<tt>Transaction</tt> / <tt>TransactionFactory</tt> and / or
<tt>ConnectionProvider</tt> APIs to talk to JTA or JDBC directly.
! </p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="architecture-s2"></a>1.2. Persistent Object Identity</h2></div></div><p>
The application may concurrently access the same persistent state in two
different sessions. However, an instance of a persistent class is never shared
--- 34,69 ----
A threadsafe (immutable) cache of compiled mappings. A factory for
<tt>Session</tt>. A client of <tt>ConnectionProvider</tt>.
! </p></dd><dt><span class="term">Session</span></dt><dd><p>
A single-threaded, short-lived object representing a conversation between
the application and the persistent store. Wraps a JDBC connection. Factory
for <tt>Transaction</tt>. Manages persistent objects to the
application.
! </p></dd><dt><span class="term">Persistent Objects and Collections</span></dt><dd><p>
Short-lived, single threaded objects containing persistent state and business
function. These might be ordinary JavaBeans, the only special thing about them
is that they are currently associated with (exactly one)
<tt>Session</tt>.
! </p></dd><dt><span class="term">Transient Objects and Collections</span></dt><dd><p>
Instances of persistent classes that are not currently associated with a
<tt>Session</tt>. They may have been instantiated by
the application and not (yet) persisted or they may have been instantiated by a
closed <tt>Session</tt>.
! </p></dd><dt><span class="term">Transaction</span></dt><dd><p>
( Optional ) A single-threaded, short-lived object used by the application to
specify atomic units of work. Abstracts application from underlying JDBC,
JTA or CORBA transaction. A <tt>Session</tt> might span several
<tt>Transaction</tt>s.
! </p></dd><dt><span class="term">ConnectionProvider</span></dt><dd><p>
( Optional ) A factory for JDBC connections. Abstracts application from
underlying <tt>Datasource</tt> or <tt>DriverManager</tt>.
Not exposed to application.
! </p></dd><dt><span class="term">TransactionFactory</span></dt><dd><p>
( Optional ) A factory for <tt>Transaction</tt>. Not exposed to the
application.
! </p></dd></dl></div><p>
Given a "lite" architecture, the application bypasses the
<tt>Transaction</tt> / <tt>TransactionFactory</tt> and / or
<tt>ConnectionProvider</tt> APIs to talk to JTA or JDBC directly.
! </p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="architecture-s2"></a>Persistent Object Identity</h2></div></div><p>
The application may concurrently access the same persistent state in two
different sessions. However, an instance of a persistent class is never shared
***************
*** 75,79 ****
<tt>foo==bar</tt>
</td></tr></table><p>
! Then for objects returned by a <span class="emphasis"><em>particular</em></span> <tt>Session</tt>,
the two notions are equivalent. However, while the application might concurrently access
the "same" (persistent identity) business object in two different sessions, the two
--- 75,79 ----
<tt>foo==bar</tt>
</td></tr></table><p>
! Then for objects returned by a <span class="emphasis"><i>particular</i></span> <tt>Session</tt>,
the two notions are equivalent. However, while the application might concurrently access
the "same" (persistent identity) business object in two different sessions, the two
***************
*** 84,90 ****
single thread per <tt>Session</tt>) or object identity (within a session the
application may safely use <tt>==</tt> to compare objects).
! </p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="architecture-s3"></a>1.3. JMX Integration</h2></div></div><p>
JMX is the J2EE standard for management of Java components. Hibernate may be managed via
a JMX standard MBean but because most application servers do not yet support JMX, Hibernate
also affords some non-standard configuration mechanisms.
! </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="session-configuration.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Hibernate Reference Documentation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. SessionFactory Configuration</td></tr></table></div></body></html>
\ No newline at end of file
--- 84,90 ----
single thread per <tt>Session</tt>) or object identity (within a session the
application may safely use <tt>==</tt> to compare objects).
! </p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="architecture-s3"></a>JMX Integration</h2></div></div><p>
JMX is the J2EE standard for management of Java components. Hibernate may be managed via
a JMX standard MBean but because most application servers do not yet support JMX, Hibernate
also affords some non-standard configuration mechanisms.
! </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="session-configuration.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Hibernate Reference Documentation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. SessionFactory Configuration</td></tr></table></div></body></html>
\ No newline at end of file
Index: best-practices.html
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/best-practices.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** best-practices.html 27 Oct 2002 11:48:37 -0000 1.7
--- best-practices.html 25 Nov 2002 21:01:47 -0000 1.8
***************
*** 1,32 ****
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
! <title>Chapter 10. Best Practices</title><link rel="stylesheet" href="../style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.52.1"><link rel="home" href="index.html" title="Hibernate Reference Documentation"><link rel="up" href="index.html" title="Hibernate Reference Documentation"><link rel="previous" href="examples.html" title="Chapter 9. Examples"><link rel="chapter" href="architecture.html" title="Chapter 1. Architecture"><link rel="chapter" href="session-configuration.html" title="Chapter 2. SessionFactory Configuration"><link rel="chapter" href="persistent-classes.html" title="Chapter 3. Persistent Classes"><link rel="chapter" href="or-mapping.html" title="Chapter 4. Basic O/R Mapping"><link rel="chapter" href="adv-or-mapping.html" title="Chapter 5. Advanced O/R Mapping"><link rel="chapter" href="manipulating-data.html" title="Chapter 6. Manipulating Persistent Data"><link rel="chapter" href="query-language.html" title="Chapter 7. Hibernate Query Language"><link rel="chapter" href="transactions.html" title="Chapter 8. Transactions And Concurrency"><link rel="chapter" href="examples.html" title="Chapter 9. Examples"><link rel="chapter" href="best-practices.html" title="Chapter 10. Best Practices"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 10. Best Practices</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="examples.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="best-practices"></a>Chapter 10. Best Practices</h2></div></div><div class="variablelist"><dl><dt><span class="term">Write fine-grained classes and map them using <tt><component></tt>
or <tt>&l...
[truncated message content] |