Update of /cvsroot/hibernate/Hibernate/doc/reference/html In directory sc8-pr-cvs1:/tmp/cvs-serv679/doc/reference/html Modified Files: adv-or-mapping.html examples.html index.html manipulating-data.html or-mapping.html session-configuration.html Log Message: calendar types Index: adv-or-mapping.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/adv-or-mapping.html,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** adv-or-mapping.html 5 Nov 2002 13:40:53 -0000 1.25 --- adv-or-mapping.html 21 Nov 2002 09:03:15 -0000 1.26 *************** *** 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-10">Ternary Associations</a></dt><dt>5.1.12. <a href="adv-or-mapping.html#adv-or-mapping-s1-11">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-10">Ternary Associations</a></dt><dt>5.1.12. <a href="adv-or-mapping.html#adv-or-mapping-s1-11">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.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 *************** *** 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-10"></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>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 *************** *** 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-11"></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>5.1.12. Collection Example</h3></div></div><p> The previous sections are pretty confusing. So lets look at an example. This class: Index: examples.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/examples.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** examples.html 28 Oct 2002 08:50:20 -0000 1.3 --- examples.html 21 Nov 2002 09:03:16 -0000 1.4 *************** *** 126,130 **** <id name="id" column="id"> ! <generator class="native"/> </id> --- 126,130 ---- <id name="id" column="id"> ! <generator class="assigned"/> <!-- The Author must have the same identifier as the Person --> </id> Index: index.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/index.html,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** index.html 5 Nov 2002 13:40:53 -0000 1.34 --- index.html 21 Nov 2002 09:03:16 -0000 1.35 *************** *** 1,3 **** <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Hibernate Reference Documentation</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="next" href="architecture.html" title="Chapter 1. Architecture"><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">Hibernate Reference Documentation</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="architecture.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><h1 class="title"><a name="d0e1"></a>Hibernate Reference Documentation</h1></div><div><h2 class="subtitle">Relational Persistence for Idiomatic Java</h2></div><div><h2 class="subtitle">http://hibernate.sourceforge.net/</h2></div><hr noshade="true"></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>1. <a href="architecture.html">Architecture</a></dt><dd><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></dd><dt>2. <a href="session-configuration.html">SessionFactory Configuration</a></dt><dd><dl><dt>2.1. <a href="session-configuration.html#session-configuration-s1">Programmatic Datastore Configuration</a></dt><dt>2.2. <a href="session-configuration.html#session-configuration-s2">Obtaining a SessionFactory</a></dt><dt>2.3. <a href="session-configuration.html#session-configuration-s3">User provided JDBC Connection</a></dt><dt>2.4. <a href="session-configuration.html#session-configuration-s4">Hibernate provided JDBC connection</a></dt><dt>2.5. <a href="session-configuration.html#session-configuration-s5">Other properties</a></dt><dt>2.6. <a href="session-configuration.html#session-configuration-s6">XML Configuration File</a></dt><dt>2.7. <a href="session-configuration.html#session-configuration-s7">Logging</a></dt></dl></dd><dt>3. <a href="persistent-classes.html">Persistent Classes</a></dt><dd><dl><dt>3.1. <a href="persistent-classes.html#persistent-classes-s1">Simple Example</a></dt><dd><dl><dt>3.1.1. <a href="persistent-classes.html#persistent-classes-s1-1">Declare accessors and mutators for persistent fields</a></dt><dt>3.1.2. <a href="persistent-classes.html#persistent-classes-s1-2">Implement a default constructor</a></dt><dt>3.1.3. <a href="persistent-classes.html#persistent-classes-s1-3">Provide an identifier property (optional)</a></dt></dl></dd><dt>3.2. <a href="persistent-classes.html#persistent-classes-s2">Inheritance</a></dt><dt>3.3. <a href="persistent-classes.html#persistent-classes-s3">Persistent Lifecycle Callbacks</a></dt><dt>3.4. <a href="persistent-classes.html#persistent-classes-s4">Validatable</a></dt></dl></dd><dt>4. <a href="or-mapping.html">Basic O/R Mapping</a></dt><dd><dl><dt>4.1. <a href="or-mapping.html#or-mapping-s1">Mapping declaration</a></dt><dd><dl><dt>4.1.1. <a href="or-mapping.html#or-mapping-s1-1">Doctype</a></dt><dt>4.1.2. <a href="or-mapping.html#or-mapping-s1-2">hibernate-mapping</a></dt><dt>4.1.3. <a href="or-mapping.html#or-mapping-s1-3">class</a></dt><dt>4.1.4. <a href="or-mapping.html#or-mapping-s1-4">id</a></dt><dt>4.1.5. <a href="or-mapping.html#or-mapping-s1-4b">composite-id</a></dt><dt>4.1.6. <a href="or-mapping.html#or-mapping-s1-5">discriminator</a></dt><dt>4.1.7. <a href="or-mapping.html#or-mapping-s1-6">version (optional)</a></dt><dt>4.1.8. <a href="or-mapping.html#or-mapping-s1-6b">timestamp (optional)</a></dt><dt>4.1.9. <a href="or-mapping.html#or-mapping-s1-7">property</a></dt><dt>4.1.10. <a href="or-mapping.html#or-mapping-s1-8">many-to-one</a></dt><dt>4.1.11. <a href="or-mapping.html#or-mapping-s1-9">one-to-one</a></dt><dt>4.1.12. <a href="or-mapping.html#or-mapping-s1-10">component</a></dt><dt>4.1.13. <a href="or-mapping.html#or-mapping-s1-11">subclass</a></dt><dt>4.1.14. <a href="or-mapping.html#or-mapping-s1-11b">joined-subclass</a></dt><dt>4.1.15. <a href="or-mapping.html#or-mapping-s1-12">map, set, list, bag</a></dt></dl></dd><dt>4.2. <a href="or-mapping.html#or-mapping-s2">Hibernate Types</a></dt><dd><dl><dt>4.2.1. <a href="or-mapping.html#or-mapping-s2-1">Entities and values</a></dt><dt>4.2.2. <a href="or-mapping.html#or-mapping-s2-2">Basic value types</a></dt><dt>4.2.3. <a href="or-mapping.html#or-mapping-s2-3">Persistent enum types</a></dt><dt>4.2.4. <a href="or-mapping.html#or-mapping-s2-4">Custom value types</a></dt><dt>4.2.5. <a href="or-mapping.html#or-mapping-s2-5">The object type</a></dt></dl></dd></dl></dd><dt>5. <a href="adv-or-mapping.html">Advanced O/R Mapping</a></dt><dd><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-10">Ternary Associations</a></dt><dt>5.1.12. <a href="adv-or-mapping.html#adv-or-mapping-s1-11">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></dd><dt>6. <a href="manipulating-data.html">Manipulating Persistent Data</a></dt><dd><dl><dt>6.1. <a href="manipulating-data.html#manipulating-data-s1">Creating a persistent object</a></dt><dt>6.2. <a href="manipulating-data.html#manipulating-data-s2">Loading an object</a></dt><dt>6.3. <a href="manipulating-data.html#manipulating-data-s3">Querying</a></dt><dd><dl><dt>6.3.1. <a href="manipulating-data.html#manipulating-data-s4">Scalar queries</a></dt><dt>6.3.2. <a href="manipulating-data.html#manipulating-data-s5">The Query interface</a></dt><dt>6.3.3. <a href="manipulating-data.html#manipulating-data-s5b">Scrollable iteration</a></dt><dt>6.3.4. <a href="manipulating-data.html#manipulating-data-s6">Filtering collections</a></dt></dl></dd><dt>6.4. <a href="manipulating-data.html#manipulating-data-s7">Updating objects saved or loaded in the current session</a></dt><dt>6.5. <a href="manipulating-data.html#manipulating-data-s8">Updating objects saved or loaded in a previous session</a></dt><dt>6.6. <a href="manipulating-data.html#manipulating-data-s9">Deleting persistent objects</a></dt><dt>6.7. <a href="manipulating-data.html#manipulating-data-s10">Graphs of objects</a></dt><dd><dl><dt>6.7.1. <a href="manipulating-data.html#manipulating-data-s11a">Lifecycle objects</a></dt><dt>6.7.2. <a href="manipulating-data.html#manipulating-data-s11b">Persistence by Reachability</a></dt></dl></dd><dt>6.8. <a href="manipulating-data.html#manipulating-data-s12">Flushing</a></dt><dt>6.9. <a href="manipulating-data.html#manipulating-data-s13">Ending a Session</a></dt><dd><dl><dt>6.9.1. <a href="manipulating-data.html#manipulating-data-s13b">Flushing the session</a></dt><dt>6.9.2. <a href="manipulating-data.html#manipulating-data-s13b">Committing the transaction</a></dt><dt>6.9.3. <a href="manipulating-data.html#manipulating-data-s13c">Closing the session</a></dt><dt>6.9.4. <a href="manipulating-data.html#manipulating-data-s13d">Exception handling</a></dt></dl></dd><dt>6.10. <a href="manipulating-data.html#manipulating-data-s17">Interceptors</a></dt></dl></dd><dt>7. <a href="query-language.html">Hibernate Query Language</a></dt><dd><dl><dt>7.1. <a href="query-language.html#query-language-s1">Case Sensitivity</a></dt><dt>7.2. <a href="query-language.html#query-language-s2">The from clause</a></dt><dt>7.3. <a href="query-language.html#query-language-s3">The select clause</a></dt><dt>7.4. <a href="query-language.html#query-language-s3b">polymorphism</a></dt><dt>7.5. <a href="query-language.html#query-language-s4">from collections</a></dt><dt>7.6. <a href="query-language.html#query-language-s5">The where clause</a></dt><dt>7.7. <a href="query-language.html#query-language-s6">Expressions</a></dt><dt>7.8. <a href="query-language.html#query-language-s7">The order by clause</a></dt><dt>7.9. <a href="query-language.html#query-language-s8">The group by clause</a></dt><dt>7.10. <a href="query-language.html#query-language-s9">Subqueries</a></dt></dl></dd><dt>8. <a href="transactions.html">Transactions And Concurrency</a></dt><dd><dl><dt>8.1. <a href="transactions.html#transactions-s1">Datastores, Sessions and Factories</a></dt><dt>8.2. <a href="transactions.html#transactions-s3">Threads and connections</a></dt><dt>8.3. <a href="transactions.html#transactions-s5">Optimistic Locking / Versioning</a></dt><dd><dl><dt>8.3.1. <a href="transactions.html#transactions-s5-1">Long session with automatic versioning</a></dt><dt>8.3.2. <a href="transactions.html#transactions-s5-2">Many sessions with automatic versioning</a></dt><dt>8.3.3. <a href="transactions.html#transactions-s5-3">Application version checking</a></dt></dl></dd><dt>8.4. <a href="transactions.html#transactions-s2">Session disconnection</a></dt><dt>8.5. <a href="transactions.html#transactions-s4">Pessimistic Locking</a></dt></dl></dd><dt>9. <a href="examples.html">Examples</a></dt><dd><dl><dt>9.1. <a href="examples.html#examples-s0">Employer / Employee</a></dt><dt>9.2. <a href="examples.html#examples-s1">Author / Work</a></dt><dt>9.3. <a href="examples.html#examples-s2">Customer / Order / Product</a></dt></dl></dd><dt>10. <a href="best-practices.html">Best Practices</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="architecture.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Chapter 1. Architecture</td></tr></table></div></body></html> \ No newline at end of file --- 1,3 ---- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Hibernate Reference Documentation</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="next" href="architecture.html" title="Chapter 1. Architecture"><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">Hibernate Reference Documentation</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="architecture.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><h1 class="title"><a name="d0e1"></a>Hibernate Reference Documentation</h1></div><div><h2 class="subtitle">Relational Persistence for Idiomatic Java</h2></div><div><h2 class="subtitle">http://hibernate.sourceforge.net/</h2></div><hr noshade="true"></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>1. <a href="architecture.html">Architecture</a></dt><dd><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></dd><dt>2. <a href="session-configuration.html">SessionFactory Configuration</a></dt><dd><dl><dt>2.1. <a href="session-configuration.html#session-configuration-s1">Programmatic Datastore Configuration</a></dt><dt>2.2. <a href="session-configuration.html#session-configuration-s2">Obtaining a SessionFactory</a></dt><dt>2.3. <a href="session-configuration.html#session-configuration-s3">User provided JDBC connection</a></dt><dt>2.4. <a href="session-configuration.html#session-configuration-s4">Hibernate provided JDBC connection</a></dt><dt>2.5. <a href="session-configuration.html#session-configuration-s5">Other properties</a></dt><dt>2.6. <a href="session-configuration.html#session-configuration-s6">XML Configuration File</a></dt><dt>2.7. <a href="session-configuration.html#session-configuration-s7">Logging</a></dt></dl></dd><dt>3. <a href="persistent-classes.html">Persistent Classes</a></dt><dd><dl><dt>3.1. <a href="persistent-classes.html#persistent-classes-s1">Simple Example</a></dt><dd><dl><dt>3.1.1. <a href="persistent-classes.html#persistent-classes-s1-1">Declare accessors and mutators for persistent fields</a></dt><dt>3.1.2. <a href="persistent-classes.html#persistent-classes-s1-2">Implement a default constructor</a></dt><dt>3.1.3. <a href="persistent-classes.html#persistent-classes-s1-3">Provide an identifier property (optional)</a></dt></dl></dd><dt>3.2. <a href="persistent-classes.html#persistent-classes-s2">Inheritance</a></dt><dt>3.3. <a href="persistent-classes.html#persistent-classes-s3">Persistent Lifecycle Callbacks</a></dt><dt>3.4. <a href="persistent-classes.html#persistent-classes-s4">Validatable</a></dt></dl></dd><dt>4. <a href="or-mapping.html">Basic O/R Mapping</a></dt><dd><dl><dt>4.1. <a href="or-mapping.html#or-mapping-s1">Mapping declaration</a></dt><dd><dl><dt>4.1.1. <a href="or-mapping.html#or-mapping-s1-1">Doctype</a></dt><dt>4.1.2. <a href="or-mapping.html#or-mapping-s1-2">hibernate-mapping</a></dt><dt>4.1.3. <a href="or-mapping.html#or-mapping-s1-3">class</a></dt><dt>4.1.4. <a href="or-mapping.html#or-mapping-s1-4">id</a></dt><dt>4.1.5. <a href="or-mapping.html#or-mapping-s1-4b">composite-id</a></dt><dt>4.1.6. <a href="or-mapping.html#or-mapping-s1-5">discriminator</a></dt><dt>4.1.7. <a href="or-mapping.html#or-mapping-s1-6">version (optional)</a></dt><dt>4.1.8. <a href="or-mapping.html#or-mapping-s1-6b">timestamp (optional)</a></dt><dt>4.1.9. <a href="or-mapping.html#or-mapping-s1-7">property</a></dt><dt>4.1.10. <a href="or-mapping.html#or-mapping-s1-8">many-to-one</a></dt><dt>4.1.11. <a href="or-mapping.html#or-mapping-s1-9">one-to-one</a></dt><dt>4.1.12. <a href="or-mapping.html#or-mapping-s1-10">component</a></dt><dt>4.1.13. <a href="or-mapping.html#or-mapping-s1-11">subclass</a></dt><dt>4.1.14. <a href="or-mapping.html#or-mapping-s1-11b">joined-subclass</a></dt><dt>4.1.15. <a href="or-mapping.html#or-mapping-s1-12">map, set, list, bag</a></dt></dl></dd><dt>4.2. <a href="or-mapping.html#or-mapping-s2">Hibernate Types</a></dt><dd><dl><dt>4.2.1. <a href="or-mapping.html#or-mapping-s2-1">Entities and values</a></dt><dt>4.2.2. <a href="or-mapping.html#or-mapping-s2-2">Basic value types</a></dt><dt>4.2.3. <a href="or-mapping.html#or-mapping-s2-3">Persistent enum types</a></dt><dt>4.2.4. <a href="or-mapping.html#or-mapping-s2-4">Custom value types</a></dt><dt>4.2.5. <a href="or-mapping.html#or-mapping-s2-5">The object type</a></dt></dl></dd></dl></dd><dt>5. <a href="adv-or-mapping.html">Advanced O/R Mapping</a></dt><dd><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></dd><dt>6. <a href="manipulating-data.html">Manipulating Persistent Data</a></dt><dd><dl><dt>6.1. <a href="manipulating-data.html#manipulating-data-s1">Creating a persistent object</a></dt><dt>6.2. <a href="manipulating-data.html#manipulating-data-s2">Loading an object</a></dt><dt>6.3. <a href="manipulating-data.html#manipulating-data-s3">Querying</a></dt><dd><dl><dt>6.3.1. <a href="manipulating-data.html#manipulating-data-s4">Scalar queries</a></dt><dt>6.3.2. <a href="manipulating-data.html#manipulating-data-s5">The Query interface</a></dt><dt>6.3.3. <a href="manipulating-data.html#manipulating-data-s5b">Scrollable iteration</a></dt><dt>6.3.4. <a href="manipulating-data.html#manipulating-data-s6">Filtering collections</a></dt></dl></dd><dt>6.4. <a href="manipulating-data.html#manipulating-data-s7">Updating objects saved or loaded in the current session</a></dt><dt>6.5. <a href="manipulating-data.html#manipulating-data-s8">Updating objects saved or loaded in a previous session</a></dt><dt>6.6. <a href="manipulating-data.html#manipulating-data-s9">Deleting persistent objects</a></dt><dt>6.7. <a href="manipulating-data.html#manipulating-data-s10">Graphs of objects</a></dt><dd><dl><dt>6.7.1. <a href="manipulating-data.html#manipulating-data-s11a">Lifecycle objects</a></dt><dt>6.7.2. <a href="manipulating-data.html#manipulating-data-s11b">Persistence by Reachability</a></dt></dl></dd><dt>6.8. <a href="manipulating-data.html#manipulating-data-s12">Flushing</a></dt><dt>6.9. <a href="manipulating-data.html#manipulating-data-s13">Ending a Session</a></dt><dd><dl><dt>6.9.1. <a href="manipulating-data.html#manipulating-data-s13-1">Flushing the session</a></dt><dt>6.9.2. <a href="manipulating-data.html#manipulating-data-s13-2">Committing the transaction</a></dt><dt>6.9.3. <a href="manipulating-data.html#manipulating-data-s13-3">Closing the session</a></dt><dt>6.9.4. <a href="manipulating-data.html#manipulating-data-s13-4">Exception handling</a></dt></dl></dd><dt>6.10. <a href="manipulating-data.html#manipulating-data-s14">Interceptors</a></dt></dl></dd><dt>7. <a href="query-language.html">Hibernate Query Language</a></dt><dd><dl><dt>7.1. <a href="query-language.html#query-language-s1">Case Sensitivity</a></dt><dt>7.2. <a href="query-language.html#query-language-s2">The from clause</a></dt><dt>7.3. <a href="query-language.html#query-language-s3">The select clause</a></dt><dt>7.4. <a href="query-language.html#query-language-s3b">polymorphism</a></dt><dt>7.5. <a href="query-language.html#query-language-s4">from collections</a></dt><dt>7.6. <a href="query-language.html#query-language-s5">The where clause</a></dt><dt>7.7. <a href="query-language.html#query-language-s6">Expressions</a></dt><dt>7.8. <a href="query-language.html#query-language-s7">The order by clause</a></dt><dt>7.9. <a href="query-language.html#query-language-s8">The group by clause</a></dt><dt>7.10. <a href="query-language.html#query-language-s9">Subqueries</a></dt></dl></dd><dt>8. <a href="transactions.html">Transactions And Concurrency</a></dt><dd><dl><dt>8.1. <a href="transactions.html#transactions-s1">Datastores, Sessions and Factories</a></dt><dt>8.2. <a href="transactions.html#transactions-s3">Threads and connections</a></dt><dt>8.3. <a href="transactions.html#transactions-s5">Optimistic Locking / Versioning</a></dt><dd><dl><dt>8.3.1. <a href="transactions.html#transactions-s5-1">Long session with automatic versioning</a></dt><dt>8.3.2. <a href="transactions.html#transactions-s5-2">Many sessions with automatic versioning</a></dt><dt>8.3.3. <a href="transactions.html#transactions-s5-3">Application version checking</a></dt></dl></dd><dt>8.4. <a href="transactions.html#transactions-s2">Session disconnection</a></dt><dt>8.5. <a href="transactions.html#transactions-s4">Pessimistic Locking</a></dt></dl></dd><dt>9. <a href="examples.html">Examples</a></dt><dd><dl><dt>9.1. <a href="examples.html#examples-s0">Employer / Employee</a></dt><dt>9.2. <a href="examples.html#examples-s1">Author / Work</a></dt><dt>9.3. <a href="examples.html#examples-s2">Customer / Order / Product</a></dt></dl></dd><dt>10. <a href="best-practices.html">Best Practices</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="architecture.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Chapter 1. Architecture</td></tr></table></div></body></html> \ No newline at end of file Index: manipulating-data.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/manipulating-data.html,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** manipulating-data.html 28 Oct 2002 15:41:54 -0000 1.22 --- manipulating-data.html 21 Nov 2002 09:03:22 -0000 1.23 *************** *** 1,5 **** <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 6. Manipulating Persistent Data</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="adv-or-mapping.html" title="Chapter 5. Advanced O/R Mapping"><link rel="next" href="query-language.html" title="Chapter 7. Hibernate Query Language"><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="manipulating-data.html#manipulating-data-s1" title="6.1. Creating a persistent object"><link rel="section" href="manipulating-data.html#manipulating-data-s2" title="6.2. Loading an object"><link rel="section" href="manipulating-data.html#manipulating-data-s3" title="6.3. Querying"><link rel="section" href="manipulating-data.html#manipulating-data-s7" title="6.4. Updating objects saved or loaded in the current session"><link rel="section" href="manipulating-data.html#manipulating-data-s8" title="6.5. Updating objects saved or loaded in a previous session"><link rel="section" href="manipulating-data.html#manipulating-data-s9" title="6.6. Deleting persistent objects"><link rel="section" href="manipulating-data.html#manipulating-data-s10" title="6.7. Graphs of objects"><link rel="section" href="manipulating-data.html#manipulating-data-s12" title="6.8. Flushing"><link rel="section" href="manipulating-data.html#manipulating-data-s13" title="6.9. Ending a Session"><link rel="section" href="manipulating-data.html#manipulating-data-s17" title="6.10. Interceptors"></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 6. Manipulating Persistent Data</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="adv-or-mapping.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="query-language.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="manipulating-data"></a>Chapter 6. Manipulating Persistent Data</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>6.1. <a href="manipulating-data.html#manipulating-data-s1">Creating a persistent object</a></dt><dt>6.2. <a href="manipulating-data.html#manipulating-data-s2">Loading an object</a></dt><dt>6.3. <a href="manipulating-data.html#manipulating-data-s3">Querying</a></dt><dd><dl><dt>6.3.1. <a href="manipulating-data.html#manipulating-data-s4">Scalar queries</a></dt><dt>6.3.2. <a href="manipulating-data.html#manipulating-data-s5">The Query interface</a></dt><dt>6.3.3. <a href="manipulating-data.html#manipulating-data-s5b">Scrollable iteration</a></dt><dt>6.3.4. <a href="manipulating-data.html#manipulating-data-s6">Filtering collections</a></dt></dl></dd><dt>6.4. <a href="manipulating-data.html#manipulating-data-s7">Updating objects saved or loaded in the current session</a></dt><dt>6.5. <a href="manipulating-data.html#manipulating-data-s8">Updating objects saved or loaded in a previous session</a></dt><dt>6.6. <a href="manipulating-data.html#manipulating-data-s9">Deleting persistent objects</a></dt><dt>6.7. <a href="manipulating-data.html#manipulating-data-s10">Graphs of objects</a></dt><dd><dl><dt>6.7.1. <a href="manipulating-data.html#manipulating-data-s11a">Lifecycle objects</a></dt><dt>6.7.2. <a href="manipulating-data.html#manipulating-data-s11b">Persistence by Reachability</a></dt></dl></dd><dt>6.8. <a href="manipulating-data.html#manipulating-data-s12">Flushing</a></dt><dt>6.9. <a href="manipulating-data.html#manipulating-data-s13">Ending a Session</a></dt><dd><dl><dt>6.9.1. <a href="manipulating-data.html#manipulating-data-s13b">Flushing the session</a></dt><dt>6.9.2. <a href="manipulating-data.html#manipulating-data-s13b">Committing the transaction</a></dt><dt>6.9.3. <a href="manipulating-data.html#manipulating-data-s13c">Closing the session</a></dt><dt>6.9.4. <a href="manipulating-data.html#manipulating-data-s13d">Exception handling</a></dt></dl></dd><dt>6.10. <a href="manipulating-data.html#manipulating-data-s17">Interceptors</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="manipulating-data-s1"></a>6.1. Creating a persistent object</h2></div></div><p> An object (entity instance) is either <span class="emphasis"><em>transient</em></span> or <span class="emphasis"><em>persistent</em></span> with respect to a particular --- 1,5 ---- <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> ! <title>Chapter 6. Manipulating Persistent Data</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="adv-or-mapping.html" title="Chapter 5. Advanced O/R Mapping"><link rel="next" href="query-language.html" title="Chapter 7. Hibernate Query Language"><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="manipulating-data.html#manipulating-data-s1" title="6.1. Creating a persistent object"><link rel="section" href="manipulating-data.html#manipulating-data-s2" title="6.2. Loading an object"><link rel="section" href="manipulating-data.html#manipulating-data-s3" title="6.3. Querying"><link rel="section" href="manipulating-data.html#manipulating-data-s7" title="6.4. Updating objects saved or loaded in the current session"><link rel="section" href="manipulating-data.html#manipulating-data-s8" title="6.5. Updating objects saved or loaded in a previous session"><link rel="section" href="manipulating-data.html#manipulating-data-s9" title="6.6. Deleting persistent objects"><link rel="section" href="manipulating-data.html#manipulating-data-s10" title="6.7. Graphs of objects"><link rel="section" href="manipulating-data.html#manipulating-data-s12" title="6.8. Flushing"><link rel="section" href="manipulating-data.html#manipulating-data-s13" title="6.9. Ending a Session"><link rel="section" href="manipulating-data.html#manipulating-data-s14" title="6.10. Interceptors"></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 6. Manipulating Persistent Data</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="adv-or-mapping.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="query-language.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="manipulating-data"></a>Chapter 6. Manipulating Persistent Data</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>6.1. <a href="manipulating-data.html#manipulating-data-s1">Creating a persistent object</a></dt><dt>6.2. <a href="manipulating-data.html#manipulating-data-s2">Loading an object</a></dt><dt>6.3. <a href="manipulating-data.html#manipulating-data-s3">Querying</a></dt><dd><dl><dt>6.3.1. <a href="manipulating-data.html#manipulating-data-s4">Scalar queries</a></dt><dt>6.3.2. <a href="manipulating-data.html#manipulating-data-s5">The Query interface</a></dt><dt>6.3.3. <a href="manipulating-data.html#manipulating-data-s5b">Scrollable iteration</a></dt><dt>6.3.4. <a href="manipulating-data.html#manipulating-data-s6">Filtering collections</a></dt></dl></dd><dt>6.4. <a href="manipulating-data.html#manipulating-data-s7">Updating objects saved or loaded in the current session</a></dt><dt>6.5. <a href="manipulating-data.html#manipulating-data-s8">Updating objects saved or loaded in a previous session</a></dt><dt>6.6. <a href="manipulating-data.html#manipulating-data-s9">Deleting persistent objects</a></dt><dt>6.7. <a href="manipulating-data.html#manipulating-data-s10">Graphs of objects</a></dt><dd><dl><dt>6.7.1. <a href="manipulating-data.html#manipulating-data-s11a">Lifecycle objects</a></dt><dt>6.7.2. <a href="manipulating-data.html#manipulating-data-s11b">Persistence by Reachability</a></dt></dl></dd><dt>6.8. <a href="manipulating-data.html#manipulating-data-s12">Flushing</a></dt><dt>6.9. <a href="manipulating-data.html#manipulating-data-s13">Ending a Session</a></dt><dd><dl><dt>6.9.1. <a href="manipulating-data.html#manipulating-data-s13-1">Flushing the session</a></dt><dt>6.9.2. <a href="manipulating-data.html#manipulating-data-s13-2">Committing the transaction</a></dt><dt>6.9.3. <a href="manipulating-data.html#manipulating-data-s13-3">Closing the session</a></dt><dt>6.9.4. <a href="manipulating-data.html#manipulating-data-s13-4">Exception handling</a></dt></dl></dd><dt>6.10. <a href="manipulating-data.html#manipulating-data-s14">Interceptors</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="manipulating-data-s1"></a>6.1. Creating a persistent object</h2></div></div><p> An object (entity instance) is either <span class="emphasis"><em>transient</em></span> or <span class="emphasis"><em>persistent</em></span> with respect to a particular *************** *** 419,423 **** performance of some transactions. However, the session is now very clever about when it flushes before queries. ! </p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="manipulating-data-s13"></a>6.9. Ending a Session</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>6.9.1. <a href="manipulating-data.html#manipulating-data-s13b">Flushing the session</a></dt><dt>6.9.2. <a href="manipulating-data.html#manipulating-data-s13b">Committing the transaction</a></dt><dt>6.9.3. <a href="manipulating-data.html#manipulating-data-s13c">Closing the session</a></dt><dt>6.9.4. <a href="manipulating-data.html#manipulating-data-s13d">Exception handling</a></dt></dl></div><p> Ending a session involves four distinct phases: </p><div class="itemizedlist"><ul type="disc"><li><p> --- 419,423 ---- performance of some transactions. However, the session is now very clever about when it flushes before queries. ! </p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="manipulating-data-s13"></a>6.9. Ending a Session</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>6.9.1. <a href="manipulating-data.html#manipulating-data-s13-1">Flushing the session</a></dt><dt>6.9.2. <a href="manipulating-data.html#manipulating-data-s13-2">Committing the transaction</a></dt><dt>6.9.3. <a href="manipulating-data.html#manipulating-data-s13-3">Closing the session</a></dt><dt>6.9.4. <a href="manipulating-data.html#manipulating-data-s13-4">Exception handling</a></dt></dl></div><p> Ending a session involves four distinct phases: </p><div class="itemizedlist"><ul type="disc"><li><p> *************** *** 429,469 **** </p></li><li><p> handle exceptions ! </p></li></ul></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="manipulating-data-s13b"></a>6.9.1. Flushing the session</h3></div></div><p> ! If you happen to be using the <tt>Transaction</tt> API, you don't ! need to worry about this step. It will be performed implicitly when the ! transaction is committed. Otherwise you should call ! <tt>Session.flush()</tt> to ensure that all changes are synchronized ! with the database. ! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="manipulating-data-s13b"></a>6.9.2. Committing the transaction</h3></div></div><p> ! If you are using the Hibernate <tt>Transaction</tt> API, this looks like: ! </p><pre class="programlisting">tx.commit(); // flush the Session and commit the transaction</pre><p> ! If you are managing JDBC transactions yourself you should manually ! <tt>commit()</tt> the JDBC connection. ! </p><pre class="programlisting">sess.flush(); sess.connection().commit(); //not necessary for JTA datasource</pre><p> ! If you decide <span class="emphasis"><em>not</em></span> to commit your changes: ! </p><pre class="programlisting">tx.rollback(); // rollback the transaction</pre><p> ! or: ! </p><pre class="programlisting">//not necessary for JTA datasource, important otherwise ! sess.connection().rollback();</pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="manipulating-data-s13c"></a>6.9.3. Closing the session</h3></div></div><p> ! A call to <tt>Session.close()</tt> marks the end of a session. The main implication ! of <tt>close()</tt> is that the JDBC connection will be relinquished by the session. ! </p><pre class="programlisting">tx.commit(); sess.close();</pre><pre class="programlisting">sess.flush(); sess.connection().commit(); //not necessary for JTA datasource sess.close();</pre><p> ! If you provided your own connection, <tt>close()</tt> returns a reference ! to it, so you can manually close it or return it to the pool. Otherwise <tt>close() ! </tt> returns it to the pool. ! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="manipulating-data-s13d"></a>6.9.4. Exception handling</h3></div></div><p> ! If the <tt>Session</tt> throws an exception (including ! any <tt>SQLException</tt>), you should immediately ! rollback the transaction, call <tt>Session.close()</tt> ! and discard the <tt>Session</tt> instance. Certain ! methods of <tt>Session</tt> will <span class="emphasis"><em>not</em></span> ! leave the session in a consistent state. ! </p><p> ! The following exception handling idiom is recommended: ! </p><pre class="programlisting">Session sess = factory.openSession(); Transaction tx = null; try { --- 429,469 ---- </p></li><li><p> handle exceptions ! </p></li></ul></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="manipulating-data-s13-1"></a>6.9.1. Flushing the session</h3></div></div><p> ! If you happen to be using the <tt>Transaction</tt> API, you don't ! need to worry about this step. It will be performed implicitly when the ! transaction is committed. Otherwise you should call ! <tt>Session.flush()</tt> to ensure that all changes are synchronized ! with the database. ! </p></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="manipulating-data-s13-2"></a>6.9.2. Committing the transaction</h3></div></div><p> ! If you are using the Hibernate <tt>Transaction</tt> API, this looks like: ! </p><pre class="programlisting">tx.commit(); // flush the Session and commit the transact... [truncated message content] |