You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(308) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(369) |
Feb
(171) |
Mar
(236) |
Apr
(187) |
May
(218) |
Jun
(217) |
Jul
(127) |
Aug
(448) |
Sep
(270) |
Oct
(231) |
Nov
(422) |
Dec
(255) |
2004 |
Jan
(111) |
Feb
(73) |
Mar
(338) |
Apr
(351) |
May
(349) |
Jun
(495) |
Jul
(394) |
Aug
(1048) |
Sep
(499) |
Oct
(142) |
Nov
(269) |
Dec
(638) |
2005 |
Jan
(825) |
Feb
(1272) |
Mar
(593) |
Apr
(690) |
May
(950) |
Jun
(958) |
Jul
(767) |
Aug
(839) |
Sep
(525) |
Oct
(449) |
Nov
(585) |
Dec
(455) |
2006 |
Jan
(603) |
Feb
(656) |
Mar
(195) |
Apr
(114) |
May
(136) |
Jun
(100) |
Jul
(128) |
Aug
(68) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(8) |
2007 |
Jan
(4) |
Feb
(3) |
Mar
(8) |
Apr
(16) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(23) |
Sep
(15) |
Oct
(5) |
Nov
(7) |
Dec
(5) |
2008 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <one...@us...> - 2003-01-28 13:27:40
|
Update of /cvsroot/hibernate/Hibernate/doc/api In directory sc8-pr-cvs1:/tmp/cvs-serv5336/doc/api Modified Files: jdstyle.css Log Message: newer css Index: jdstyle.css =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/api/jdstyle.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jdstyle.css 10 Feb 2002 11:06:36 -0000 1.1 --- jdstyle.css 28 Jan 2003 13:27:36 -0000 1.2 *************** *** 5,20 **** /* Page background color */ body { font-family: Arial; ! background-color: silver; font-size: 10pt; - color: navy; } td { font-family: Arial; font-size: 10pt; - color: navy; } /* Table colors */ ! .TableHeadingColor { background: #CCCCFF } /* Dark mauve */ ! .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ ! .TableRowColor { background: #FFFFFF } /* White */ /* Font used in left-hand frame lists */ --- 5,18 ---- /* Page background color */ body { font-family: Arial; ! background-color: white; font-size: 10pt; } td { font-family: Arial; font-size: 10pt; } /* Table colors */ ! .TableHeadingColor { background: #F4F4F4 } ! .TableSubHeadingColor { background: #F4F4F4 } ! .TableRowColor { background: #FFFFFF } /* Font used in left-hand frame lists */ *************** *** 27,32 **** /* Navigation bar fonts and colors */ ! .NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */ ! .NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */ .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} --- 25,31 ---- /* Navigation bar fonts and colors */ ! .NavBarCell1 { background-color:#F4F4F4;} ! .NavBarCell1Rev { background-color:silver;} ! .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} *************** *** 35,36 **** --- 34,117 ---- .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} + A { + color: #003399; + } + + A:active { + color: #003399; + } + + A:visited { + color: #888888; + } + + P, OL, UL, LI, DL, DT, DD, BLOCKQUOTE { + color: #000000; + } + + TD, TH, SPAN { + color: #000000; + } + + BLOCKQUOTE { + margin-right: 0px; + } + + + /*H1, H2, H3, H4, H5, H6 { + color: #000000; + font-weight:500; + margin-top:10px; + padding-top:15px; + } + + H1 { font-size: 150%; } + H2 { font-size: 140%; } + H3 { font-size: 110%; font-weight: bold; } + H4 { font-size: 110%; font-weight: bold;} + H5 { font-size: 100%; font-style: italic; } + H6 { font-size: 100%; font-style: italic; }*/ + + TT { + font-size: 90%; + font-family: "Courier New", Courier, monospace; + color: #000000; + } + + PRE { + font-size: 90%; + padding: 5px; + border-style: solid; + border-width: 1px; + border-color: #CCCCCC; + background-color: #F4F4F4; + } + + UL, OL, LI { + list-style: disc; + } + + HR { + width: 100%; + height: 1px; + background-color: #CCCCCC; + border-width: 0px; + padding: 0px; + color: #CCCCCC; + } + + .variablelist { + padding-top: 10; + padding-bottom:10; + margin:0; + } + + .itemizedlist, UL { + padding-top: 0; + padding-bottom:0; + margin:0; + } + + .term { + font-weight:bold; + } |
From: <tu...@us...> - 2003-01-28 13:26:49
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/pdf In directory sc8-pr-cvs1:/tmp/cvs-serv4784/pdf Modified Files: hibernate_reference.pdf Log Message: Updated doco Index: hibernate_reference.pdf =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/pdf/hibernate_reference.pdf,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** hibernate_reference.pdf 1 Jan 2003 13:46:16 -0000 1.1.1.1 --- hibernate_reference.pdf 28 Jan 2003 13:26:41 -0000 1.2 *************** *** 46,50 **** endobj 32 0 obj ! (2.1. Programmatic Datastore Configuration) endobj 33 0 obj --- 46,50 ---- endobj 32 0 obj ! (2.1. Programmatic Configuration) endobj [...28211 lines suppressed...] ! 0000479476 00000 n ! 0000483396 00000 n ! 0000483520 00000 n ! 0000483646 00000 n ! 0000483726 00000 n ! 0000483808 00000 n ! 0000494517 00000 n ! 0000532431 00000 n ! 0000532472 00000 n ! 0000532512 00000 n ! 0000532693 00000 n trailer << ! /Size 3140 ! /Root 3138 0 R ! /Info 3139 0 R >> startxref ! 533015 %%EOF |
From: <tu...@us...> - 2003-01-28 13:25:15
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/html In directory sc8-pr-cvs1:/tmp/cvs-serv4176/html Modified Files: adv-or-mapping.html architecture.html best-practices.html examples.html index.html manipulating-data.html or-mapping.html query-language.html session-configuration.html transactions.html Log Message: Updated doco Index: adv-or-mapping.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/html/adv-or-mapping.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** adv-or-mapping.html 1 Jan 2003 13:43:03 -0000 1.1.1.1 --- adv-or-mapping.html 28 Jan 2003 13:25:09 -0000 1.2 *************** *** 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 --- 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 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-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><dt><a href="adv-or-mapping.html#adv-or-mapping-s2-4">Dynabean components</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 Collections</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 *************** *** 44,53 **** (HashSet) cat.getKittens(); //Error!</pre><p> Collections (and subcollections) obey the usual rules for value types: no shared ! references, created and deleted along with containing entity. </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). </p><p> There are quite a range of mappings that can be generated for collections, --- 44,70 ---- (HashSet) cat.getKittens(); //Error!</pre><p> Collections (and subcollections) obey the usual rules for value types: no shared ! references, created and deleted along with containing entity. Due to the underlying ! relational model, they do not support null value semantics; Hibernate does not ! distinguish between a null collection reference and an empty collection. </p><p> ! Collection instances are distinguished in the database by a foreign key to ! the owning entity. This foreign key is referred to as the <span class="emphasis"><i>collection key ! </i></span> (Collections may not contain other collections). The collection key ! is mapped by the <tt><key></tt> element. ! </p><p> ! Collections may contain almost any other Hibernate type, including all basic types, ! custom types, entity types and components. Collections may not contain other ! collections. The contained type is referred to as the <span class="emphasis"><i>collection element ! type</i></span>. Collection elements are mapped by using <tt><element></tt>, ! <tt><composite-element></tt>, <tt><one-to-many></tt> or ! <tt><many-to-many></tt>. ! </p><p> ! All collection types except <tt>Set</tt> and bag have an <span class="emphasis"><i>index ! </i></span> column - a column that maps to an array or <tt>List</tt> index or ! <tt>Map</tt> 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). The ! index of an array or list is always of type <tt>integer</tt>. Indexes are ! mapped using <tt><index></tt>, <tt><index-many-to-many></tt> ! or <tt><composite-index></tt>. </p><p> There are quite a range of mappings that can be generated for collections, *************** *** 55,80 **** 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 - the collection's identifier). - </p><p> - Nested collection roles are declared inside a - <tt>class</tt> or <tt>component</tt> tag. - 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 - reference and an empty collection. - </p><p> - Toplevel collections are declared directly beneath the root element of a mapping - and may be referenced by a properties of any class or component, or by another - collection. They require their own ID generator (but may not use - <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 --- 72,75 ---- *************** *** 87,94 **** <tt><map></tt> is representative: </p><pre class="programlisting"><map ! role="roleName" table="table_name" schema="schema_name lazy="true|false" cascade="all|none|save-update|delete" sort="unsorted|natural|comparatorClass" --- 82,90 ---- <tt><map></tt> is representative: </p><pre class="programlisting"><map ! name="propertyName" table="table_name" schema="schema_name lazy="true|false" + inverse="true|false" cascade="all|none|save-update|delete" sort="unsorted|natural|comparatorClass" *************** *** 99,106 **** <element .... /> </map></pre><div class="itemizedlist"><ul type="disc"><li><p> ! <tt>role</tt> the name of the toplevel collection role ! or nested collection property </p></li><li><p> ! <tt>table</tt> (optional - defaults to role name) the name of the collection table (not used for one-to-many associations) </p></li><li><p> --- 95,101 ---- <element .... /> </map></pre><div class="itemizedlist"><ul type="disc"><li><p> ! <tt>name</tt> the collection property name </p></li><li><p> ! <tt>table</tt> (optional - defaults to property name) the name of the collection table (not used for one-to-many associations) </p></li><li><p> *************** *** 111,114 **** --- 106,112 ---- enable lazy initialization (not used for arrays) </p></li><li><p> + <tt>inverse</tt> (optional - defaults to <tt>false</tt>) + mark this collection as the "inverse" end of a bidirectional association + </p></li><li><p> <tt>cascade</tt> (optional - defaults to <tt>none</tt>) enable operations to cascade to child entities (not used for toplevel *************** *** 121,194 **** 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 ! toplevel collection or a collection to a subcollection. ! </p><pre class="programlisting"><collection ! name="propertyName" ! column="column_name" ! role="some_role" ! cascade="all|none|save-update|delete"/> ! ! <subcollection ! column="column_name" ! role="some_role"/></pre><div class="itemizedlist"><ul type="disc"><li><p> ! <tt>name</tt> the property name ! </p></li><li><p> ! <tt>role</tt> the name of the toplevel collection role ! </p></li><li><p> ! <tt>column</tt> (optional - defaults to property name) ! the column holding the toplevel collection identifier ! </p></li><li><p> ! <tt>cascade</tt> (optional) enable cascaded operations ! </p></li></ul></div><p> ! 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> Examples: </p><p> ! First, a set of strings. This is a nested collection so it doesn't declare its ! own key type or generator (even nested collections declare a ! <tt><key></tt> element - the foreign key of their ! owning class): ! </p><pre class="programlisting"><set role="names" table="NAMES"> <key column="GROUPID"/> <element column="NAME" type="string"/> </set></pre><p> ! A nested bag containing integers (with an iteration order determined by the <tt>order-by</tt> attribute): ! </p><pre class="programlisting"><bag role="sizes" table="SIZES" order-by="SIZE ASC"> <key column="OWNER"/> <element column="SIZE" type="integer"/> </bag></pre><p> ! A nested array of entities - in this case, a many to many association (note that the entities are lifecycle objects, <tt>cascade="all"</tt>): ! </p><pre class="programlisting"><array role="foos" table="BAR_FOOS" cascade="all"> <key column="BAR_ID"/> <index column="I"/> <many-to-many column="FOO_ID" class="com.illflow.Foo"/> </array></pre><p> ! A toplevel map from string indices to dates (this might be a useful mapping ! style if many different classes all had collections living in the one table, or ! if the map was a subcollection): ! </p><pre class="programlisting"><map role="holidays" table="holidays" schema="dbo" order-by="hol_name asc"> ! <generated-key column="id" type="string"> ! <generator class="uuid.hex"/> ! </key> <index column="hol_name" type="string"/> <element column="hol_date" type="date"/> </map></pre><p> ! A nested list of components: ! </p><pre class="programlisting"><list role="carComponents" table="car_components"> <key column="car_id"/> <index column="posn"/> --- 119,159 ---- 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-5"></a>Collections of Values and Many To Many Associations</h3></div></div><p> ! A collection table is required for any collection of values and any collection of entities ! mapped as a many-to-many association (the natural semantics for a Java collection). The ! table requires identifier column(s), element column(s) and possibly index column(s). </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 usually the best relational model. </p><p> Examples: </p><p> ! First, a set of strings: ! </p><pre class="programlisting"><set name="names" table="NAMES"> <key column="GROUPID"/> <element column="NAME" type="string"/> </set></pre><p> ! A bag containing integers (with an iteration order determined by the <tt>order-by</tt> attribute): ! </p><pre class="programlisting"><bag name="sizes" table="SIZES" order-by="SIZE ASC"> <key column="OWNER"/> <element column="SIZE" type="integer"/> </bag></pre><p> ! An array of entities - in this case, a many to many association (note that the entities are lifecycle objects, <tt>cascade="all"</tt>): ! </p><pre class="programlisting"><array name="foos" table="BAR_FOOS" cascade="all"> <key column="BAR_ID"/> <index column="I"/> <many-to-many column="FOO_ID" class="com.illflow.Foo"/> </array></pre><p> ! A map from string indices to dates: ! </p><pre class="programlisting"><map name="holidays" table="holidays" schema="dbo" order-by="hol_name asc"> ! <key column="id"/> <index column="hol_name" type="string"/> <element column="hol_date" type="date"/> </map></pre><p> ! A list of components: ! </p><pre class="programlisting"><list name="carComponents" table="car_components"> <key column="car_id"/> <index column="posn"/> *************** *** 201,207 **** 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: </p><div class="itemizedlist"><ul type="disc"><li><p> No null values may be contained in a map or set --- 166,171 ---- 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 ! relational model loses some of the semantics of Java collections: </p><div class="itemizedlist"><ul type="disc"><li><p> No null values may be contained in a map or set *************** *** 222,231 **** </p><p> Example: ! </p><pre class="programlisting"><set role="bars" table="foobars"> <key column="foo_id"/> <one-to-many class="com.illflow.Bar"/> </set></pre><p> ! 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 --- 186,194 ---- </p><p> Example: ! </p><pre class="programlisting"><set name="bars" table="foobars"> <key column="foo_id"/> <one-to-many class="com.illflow.Bar"/> </set></pre><p> ! 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 *************** *** 256,272 **** </p><p> Declare a lazy collection using the optional <tt>lazy</tt> attribute ! </p><pre class="programlisting"><set role="names" table="NAMES" lazy="true"> <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 ! <tt>java.util.SortedSet</tt>. You must specify a ! comparator in the mapping file: ! </p><pre class="programlisting"><set role="names" sort="natural"> ... </set> ! <map role="holidays" sort="my.custom.StringComparator" lazy="true"> ... </map></pre><p> --- 219,233 ---- </p><p> Declare a lazy collection using the optional <tt>lazy</tt> attribute ! </p><pre class="programlisting"><set name="names" table="NAMES" lazy="true"> <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 ! <tt>java.util.SortedSet</tt>. You must specify a comparator in the mapping file: ! </p><pre class="programlisting"><set name="names" sort="natural"> ... </set> ! <map name="holidays" sort="my.custom.StringComparator" lazy="true"> ... </map></pre><p> *************** *** 294,321 **** 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"/> .... ! <bag role="accessibleTo" table="node_access" lazy="true"> <key column="to_node_id"/> <many-to-many class="eg.Node" column="from_node_id"/> </bag> ! <bag role="accessibleFrom" table="node_access" readonly="true" lazy="true"> <!-- readonly end --> <key column="from_node_id"/> <many-to-many class="eg.Node" column="to_node_id"/> </bag> </class></pre><p> ! Changes made to the readonly end of the association are <span class="emphasis"><i>not</i></span> ! persistent. </p><p> You may map a bidirectional one-to-many association by mapping a nested, one-to-many set / bag to the same table column(s) as a many-to-one association and ! declaring the many-valued end readonly. </p><pre class="programlisting"><class name="eg.Parent"> <id name="id" column="id"/> .... ! <set role="children" readonly="true" lazy="true"> <key column="parent_id"/> <one-to-many class="eg.Child"/> --- 255,282 ---- 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>inverse</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"/> .... ! <bag name="accessibleTo" table="node_access" lazy="true"> <key column="to_node_id"/> <many-to-many class="eg.Node" column="from_node_id"/> </bag> ! <bag name="accessibleFrom" table="node_access" inverse="true" lazy="true"> <!-- inverse end --> <key column="from_node_id"/> <many-to-many class="eg.Node" column="to_node_id"/> </bag> </class></pre><p> ! Changes made only to the inverse end of the association are <span class="emphasis"><i>not</i></span> ! persisted. </p><p> You may map a bidirectional one-to-many association by mapping a nested, one-to-many set / bag to the same table column(s) as a many-to-one association and ! declaring the many-valued end inverse. </p><pre class="programlisting"><class name="eg.Parent"> <id name="id" column="id"/> .... ! <set name="children" inverse="true" lazy="true"> <key column="parent_id"/> <one-to-many class="eg.Child"/> *************** *** 331,339 **** composite elements (discussed below). Another is to use a <tt>Map</tt> with an association as its index. ! </p><pre class="programlisting"><map role="contracts" lazy="true"> <key column="employer_id"/> <index-many-to-many column="employee_id" class="Employee"/> <one-to-many column="contract_id" class="Contract"/> ! </map></pre><pre class="programlisting"><map role="connections" lazy="true"> <key column="node1_id"/> <index-many-to-many column="node2_id" class="Node"/> --- 292,300 ---- composite elements (discussed below). Another is to use a <tt>Map</tt> with an association as its index. ! </p><pre class="programlisting"><map name="contracts" lazy="true"> <key column="employer_id"/> <index-many-to-many column="employee_id" class="Employee"/> <one-to-many column="contract_id" class="Contract"/> ! </map></pre><pre class="programlisting"><map name="connections" lazy="true"> <key column="node1_id"/> <index-many-to-many column="node2_id" class="Node"/> *************** *** 367,371 **** <generator class="sequence"/> </id> ! <set role="children" lazy="true"> <key type="long" column="parent_id"/> <one-to-many class="eg.Child"/> --- 328,332 ---- <generator class="sequence"/> </id> ! <set name="children" lazy="true"> <key type="long" column="parent_id"/> <one-to-many class="eg.Child"/> *************** *** 393,397 **** <generator class="sequence"/> </id> ! <set role="children" lazy="true" table="childset"> <key type="long" column="parent_id"/> <many-to-many class="eg.Child" column="child_id"/> --- 354,358 ---- <generator class="sequence"/> </id> ! <set name="children" lazy="true" table="childset"> <key type="long" column="parent_id"/> <many-to-many class="eg.Child" column="child_id"/> *************** *** 409,443 **** create table childset ( parent_id bigint, child_id bigint ) alter table childset add constraint childsetfk0 (parent_id) references parent ! alter table childset add constraint childsetfk1 (child_id) references child</pre><p> ! If many different classes contain sets of ! <tt>eg.Child</tt> or if, for some reason, we need to ! distinguish between a null collection reference and an empty set, a toplevel ! collection might be used: ! </p><pre class="programlisting"><hibernate-mapping> ! ! <set role="childset" lazy="true"> ! <generated-key type="long" column="id"> ! <generator class="sequence"/> ! </key> ! <many-to-many class="eg.Child" column="child_id"/> ! </set> ! ! <class name="eg.Parent> ! <id name="id"> ! <generator class="sequence"/> ! </id> ! <collection name="children" column="childset_id" role="childset"/> ! </class> ! ! <class name="eg.Child"> ! .... ! </class> ! ! </hibernate-mapping></pre><p> ! Table definitions: ! </p><pre class="programlisting">create table parent ( id bigint not null primary key, childset_id bigint ) ! 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 --- 370,374 ---- create table childset ( parent_id bigint, child_id bigint ) alter table childset add constraint childsetfk0 (parent_id) references parent ! alter table childset add constraint childsetfk1 (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 *************** *** 533,540 **** replacing the <tt><element></tt> tag with a <tt><composite-element></tt> tag. ! </p><pre class="programlisting"><set role="some_names" lazy="true"> ! <key name="id" type="string"> ! <generator class="uuid.hex"/> ! </key> <composite-element class="eg.Name"> <!-- class attribute required --> <property name="initial"/> --- 464,469 ---- replacing the <tt><element></tt> tag with a <tt><composite-element></tt> tag. ! </p><pre class="programlisting"><set name="some_names" lazy="true"> ! <key column="id"/> <composite-element class="eg.Name"> <!-- class attribute required --> <property name="initial"/> *************** *** 543,548 **** </composite-element> </set></pre><p> ! Composite elements may contain components and even toplevel collections, ! but not nested collections. If your composite element itself contains components, use the <tt><nested-composite-element></tt> tag. This is a pretty exotic case - a collection of components which --- 472,477 ---- </composite-element> </set></pre><p> ! Composite elements may contain components not collections. If your composite ! element itself contains components, use the <tt><nested-composite-element></tt> tag. This is a pretty exotic case - a collection of components which *************** *** 562,566 **** </p><pre class="programlisting"><class name="eg.Order" .... > .... ! <set role="purchasedItems" lazy="true"> <key name="order_id"> <composite-element class="eg.Purchase"> --- 491,495 ---- </p><pre class="programlisting"><class name="eg.Order" .... > .... ! <set name="purchasedItems" lazy="true"> <key name="order_id"> <composite-element class="eg.Purchase"> *************** *** 573,577 **** </class></pre><p>Even ternary (or quaternary, etc) associations are possible:</p><pre class="programlisting"><class name="eg.Order" .... > .... ! <set role="purchasedItems" lazy="true"> <key name="order_id"> <composite-element class="eg.OrderLine"> --- 502,506 ---- </class></pre><p>Even ternary (or quaternary, etc) associations are possible:</p><pre class="programlisting"><class name="eg.Order" .... > .... ! <set name="purchasedItems" lazy="true"> <key name="order_id"> <composite-element class="eg.OrderLine"> *************** *** 623,627 **** Actually it is an alternative to the <tt>column</tt> attribute everywhere. A collection with elements of type <tt>Foo</tt> would use: ! </p><pre class="programlisting"><set role="foos"> <key column="owner_id"/> <many-to-many class="eg.Foo"> --- 552,556 ---- Actually it is an alternative to the <tt>column</tt> attribute everywhere. A collection with elements of type <tt>Foo</tt> would use: ! </p><pre class="programlisting"><set name="foos"> <key column="owner_id"/> <many-to-many class="eg.Foo"> *************** *** 638,642 **** .... .... ! <set role="Dates" lazy="true"> <key> <!-- a nested collection inherits the composite key type --> <column name="foo_string"/> --- 567,571 ---- .... .... ! <set name="Dates" lazy="true"> <key> <!-- a nested collection inherits the composite key type --> <column name="foo_string"/> *************** *** 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 --- 575,591 ---- <element column="foo_date" type="date"/> </set> ! </class></pre></div><div class="sect2"><div class="titlepage"><div><h3 class="title"><a name="adv-or-mapping-s2-4"></a>Dynabean components</h3></div></div><p> ! You may even map a property of type <tt>DynaBean</tt>: ! </p><pre class="programlisting"><dynabean name="userAttributes" dynaclass="UserAttributes"> ! <property name="foo" column="FOO"/> ! <property name="bar" column="BAR"/> ! <many-to-one name="baz" class="eg.Baz" column="BAZ"/> ! </dynabean></pre><p> ! The semantics of a <tt><dynabean></tt> mapping are identical ! to <tt><component></tt>. The advantage of this kind of mapping ! is the ability to determine the actual properties of the bean at deployment time ! by editting the mapping document. (Runtime manipulation of the mapping document ! is also possible, using a DOM parser.) ! </p></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 *************** *** 676,680 **** or where serializable transaction isolation level is needed. If the cache is used in a JTA environment, you must specify the property ! <tt>hibernate.transaction.manager_class</tt>, naming a strategy for obtaining the JTA <tt>TransactionManager</tt>. In other environments, you should ensure that the transaction is completed when <tt>Session.close()</tt> or --- 617,621 ---- or where serializable transaction isolation level is needed. If the cache is used in a JTA environment, you must specify the property ! <tt>hibernate.transaction.manager_lookup_class</tt>, naming a strategy for obtaining the JTA <tt>TransactionManager</tt>. In other environments, you should ensure that the transaction is completed when <tt>Session.close()</tt> or *************** *** 683,687 **** <jcs-cache usage="read-write"/> .... ! <set role="kittens" ... > <jcs-cache usage="read-write"/> .... --- 624,628 ---- <jcs-cache usage="read-write"/> .... ! <set name="kittens" ... > <jcs-cache usage="read-write"/> .... Index: architecture.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/html/architecture.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** architecture.html 1 Jan 2003 13:43:03 -0000 1.1.1.1 --- architecture.html 28 Jan 2003 13:25:09 -0000 1.2 *************** *** 18,30 **** Heres some definitions of the objects in the diagrams: </p><div class="itemizedlist"><ul type="disc"><li><p> ! <tt>cirrus.hibernate.SessionFactory</tt> </p></li><li><p> ! <tt>cirrus.hibernate.Session</tt> </p></li><li><p> ! <tt>cirrus.hibernate.Transaction</tt> </p></li><li><p> ! <tt>cirrus.hibernate.TransactionFactory</tt> </p></li><li><p> ! <tt>cirrus.hibernate.connection.ConnectionProvider</tt> </p></li><li><p> persistent objects and collections --- 18,30 ---- Heres some definitions of the objects in the diagrams: </p><div class="itemizedlist"><ul type="disc"><li><p> ! <tt>net.sf.hibernate.SessionFactory</tt> </p></li><li><p> ! <tt>net.sf.hibernate.Session</tt> </p></li><li><p> ! <tt>net.sf.hibernate.Transaction</tt> </p></li><li><p> ! <tt>net.sf.hibernate.TransactionFactory</tt> </p></li><li><p> ! <tt>net.sf.hibernate.connection.ConnectionProvider</tt> </p></li><li><p> persistent objects and collections Index: best-practices.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/html/best-practices.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** best-practices.html 1 Jan 2003 13:43:04 -0000 1.1.1.1 --- best-practices.html 28 Jan 2003 13:25:09 -0000 1.2 *************** *** 27,36 **** Hibernate lets the application manage JDBC connections. This approach should be considered a last-resort. If you can't use the built-in connections providers, consider providing your ! own implementation of <tt>cirrus.hibernate.connection.ConnectionProvider</tt>. </p></dd><dt><span class="term">Consider using a custom type.</span></dt><dd><p> Suppose you have a Java type, say from some library, that needs to be persisted but doesn't provide the accessors needed to map it as a component. You should consider implementing ! <tt>cirrus.hibernate.UserType</tt>. This approach frees the application code from implementing transformations to / from a Hibernate type. </p></dd><dt><span class="term">Use hand-coded JDBC in bottlenecks.</span></dt><dd><p> --- 27,36 ---- Hibernate lets the application manage JDBC connections. This approach should be considered a last-resort. If you can't use the built-in connections providers, consider providing your ! own implementation of <tt>net.sf.hibernate.connection.ConnectionProvider</tt>. </p></dd><dt><span class="term">Consider using a custom type.</span></dt><dd><p> Suppose you have a Java type, say from some library, that needs to be persisted but doesn't provide the accessors needed to map it as a component. You should consider implementing ! <tt>net.sf.hibernate.UserType</tt>. This approach frees the application code from implementing transformations to / from a Hibernate type. </p></dd><dt><span class="term">Use hand-coded JDBC in bottlenecks.</span></dt><dd><p> Index: examples.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/html/examples.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** examples.html 1 Jan 2003 13:43:05 -0000 1.1.1.1 --- examples.html 28 Jan 2003 13:25:09 -0000 1.2 *************** *** 14,18 **** <id name="id"> <generator class="sequence"> ! <param>employer_id_seq</param> </generator> </id> --- 14,18 ---- <id name="id"> <generator class="sequence"> ! <param name="sequence">employer_id_seq</param> </generator> </id> *************** *** 24,28 **** <id name="id"> <generator class="sequence"> ! <param>employment_id_seq</param> </generator> </id> --- 24,28 ---- <id name="id"> <generator class="sequence"> ! <param name="sequence">employment_id_seq</param> </generator> </id> *************** *** 45,49 **** <id name="id"> <generator class="sequence"> ! <param>employee_id_seq</param> </generator> </id> --- 45,49 ---- <id name="id"> <generator class="sequence"> ! <param name="sequence">employee_id_seq</param> </generator> </id> *************** *** 107,111 **** <property name="title"/> ! <set role="authors" table="author_work"> <key column="work_id" not-null="true"/> <many-to-many class="Author" column="author_id" not-null="true"/> --- 107,111 ---- <property name="title"/> ! <set name="authors" table="author_work"> <key column="work_id" not-null="true"/> <many-to-many class="Author" column="author_id" not-null="true"/> *************** *** 132,136 **** <one-to-one name="person" constrained="true"/> ! <set role="works" table="author_work" readonly="true"> <key column="author_id"/> <many-to-many class="Work" column="work_id"/> --- 132,136 ---- <one-to-one name="person" constrained="true"/> ! <set name="works" table="author_work" readonly="true"> <key column="author_id"/> <many-to-many class="Work" column="work_id"/> *************** *** 200,204 **** </id> <property name="name"/> ! <set role="orders" readonly="true"> <key column="customer_id"/> <one-to-many class="Order"/> --- 200,204 ---- </id> <property name="name"/> ! <set name="orders" readonly="true"> <key column="customer_id"/> <one-to-many class="Order"/> *************** *** 212,216 **** <property name="date"/> <many-to-one name="customer" column="customer_id"/> ! <list role="lineItems" table="line_items"> <key column="order_id"/> <index column="line_number"/> --- 212,216 ---- <property name="date"/> <many-to-one name="customer" column="customer_id"/> ! <list name="lineItems" table="line_items"> <key column="order_id"/> <index column="line_number"/> Index: index.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/html/index.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.html 1 Jan 2003 13:43:05 -0000 1.1.1.1 --- index.html 28 Jan 2003 13:25:09 -0000 1.2 *************** *** 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.49"><link rel="home" href="index.html" title="Hibernate Reference Documentation"><link rel="next" href="architecture.html" title="Chapter 1. Architecture"></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></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>1. <a href="architecture.html">Architecture</a></dt><dd><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></dd><dt>2. <a href="session-configuration.html">SessionFactory Configuration</a></dt><dd><dl><dt><a href="session-configuration.html#session-configuration-s1">Programmatic Datastore Configuration</a></dt><dt><a href="session-configuration.html#session-configuration-s2">Obtaining a SessionFactory</a></dt><dt><a href="session-configuration.html#session-configuration-s3">User provided JDBC connection</a></dt><dt><a href="session-configuration.html#session-configuration-s4">Hibernate provided JDBC connection</a></dt><dt><a href="session-configuration.html#session-configuration-s5">Other properties</a></dt><dt><a href="session-configuration.html#session-configuration-s6">XML Configuration File</a></dt><dt><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><a href="persistent-classes.html#persistent-classes-s1">Simple Example</a></dt><dd><dl><dt><a href="persistent-classes.html#persistent-classes-s1-1">Declare accessors and mutators for persistent fields</a></dt><dt><a href="persistent-classes.html#persistent-classes-s1-2">Implement a default constructor</a></dt><dt><a href="persistent-classes.html#persistent-classes-s1-3">Provide an identifier property (optional)</a></dt></dl></dd><dt><a href="persistent-classes.html#persistent-classes-s2">Inheritance</a></dt><dt><a href="persistent-classes.html#persistent-classes-s3">Persistent Lifecycle Callbacks</a></dt><dt><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><a href="or-mapping.html#or-mapping-s1">Mapping declaration</a></dt><dd><dl><dt><a href="or-mapping.html#or-mapping-s1-1">Doctype</a></dt><dt><a href="or-mapping.html#or-mapping-s1-2">hibernate-mapping</a></dt><dt><a href="or-mapping.html#or-mapping-s1-3">class</a></dt><dt><a href="or-mapping.html#or-mapping-s1-4">id</a></dt><dt><a href="or-mapping.html#or-mapping-s1-4b">composite-id</a></dt><dt><a href="or-mapping.html#or-mapping-s1-5">discriminator</a></dt><dt><a href="or-mapping.html#or-mapping-s1-6">version (optional)</a></dt><dt><a href="or-mapping.html#or-mapping-s1-6b">timestamp (optional)</a></dt><dt><a href="or-mapping.html#or-mapping-s1-7">property</a></dt><dt><a href="or-mapping.html#or-mapping-s1-8">many-to-one</a></dt><dt><a href="or-mapping.html#or-mapping-s1-9">one-to-one</a></dt><dt><a href="or-mapping.html#or-mapping-s1-10">component</a></dt><dt><a href="or-mapping.html#or-mapping-s1-11">subclass</a></dt><dt><a href="or-mapping.html#or-mapping-s1-11b">joined-subclass</a></dt><dt><a href="or-mapping.html#or-mapping-s1-12">map, set, list, bag</a></dt></dl></dd><dt><a href="or-mapping.html#or-mapping-s2">Hibernate Types</a></dt><dd><dl><dt><a href="or-mapping.html#or-mapping-s2-1">Entities and values</a></dt><dt><a href="or-mapping.html#or-mapping-s2-2">Basic value types</a></dt><dt><a href="or-mapping.html#or-mapping-s2-3">Persistent enum types</a></dt><dt><a href="or-mapping.html#or-mapping-s2-4">Custom value types</a></dt><dt><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><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></dd><dt>6. <a href="manipulating-data.html">Manipulating Persistent Data</a></dt><dd><dl><dt><a href="manipulating-data.html#manipulating-data-s1">Creating a persistent object</a></dt><dt><a href="manipulating-data.html#manipulating-data-s2">Loading an object</a></dt><dt><a href="manipulating-data.html#manipulating-data-s3">Querying</a></dt><dd><dl><dt><a href="manipulating-data.html#manipulating-data-s4">Scalar queries</a></dt><dt><a href="manipulating-data.html#manipulating-data-s5">The Query interface</a></dt><dt><a href="manipulating-data.html#manipulating-data-s5b">Scrollable iteration</a></dt><dt><a href="manipulating-data.html#manipulating-data-s6">Filtering collections</a></dt></dl></dd><dt><a href="manipulating-data.html#manipulating-data-s7">Updating objects saved or loaded in the current session</a></dt><dt><a href="manipulating-data.html#manipulating-data-s8">Updating objects saved or loaded in a previous session</a></dt><dt><a href="manipulating-data.html#manipulating-data-s9">Deleting persistent objects</a></dt><dt><a href="manipulating-data.html#manipulating-data-s10">Graphs of objects</a></dt><dd><dl><dt><a href="manipulating-data.html#manipulating-data-s11a">Lifecycle objects</a></dt><dt><a href="manipulating-data.html#manipulating-data-s11b">Persistence by Reachability</a></dt></dl></dd><dt><a href="manipulating-data.html#manipulating-data-s12">Flushing</a></dt><dt><a href="manipulating-data.html#manipulating-data-s13">Ending a Session</a></dt><dd><dl><dt><a href="manipulating-data.html#manipulating-data-s13-1">Flushing the session</a></dt><dt><a href="manipulating-data.html#manipulating-data-s13-2">Committing the transaction</a></dt><dt><a href="manipulating-data.html#manipulating-data-s13-3">Closing the session</a></dt><dt><a href="manipulating-data.html#manipulating-data-s13-4">Exception handling</a></dt></dl></dd><dt><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><a href="query-language.html#query-language-s1">Case Sensitivity</a></dt><dt><a href="query-language.html#query-language-s2">The from clause</a></dt><dt><a href="query-language.html#query-language-s3">The select c... [truncated message content] |
From: <tu...@us...> - 2003-01-28 13:25:14
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv4176/src Modified Files: advanced_or_mapping.xml index.xml Log Message: Updated doco Index: advanced_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/advanced_or_mapping.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** advanced_or_mapping.xml 28 Jan 2003 12:15:51 -0000 1.8 --- advanced_or_mapping.xml 28 Jan 2003 13:25:10 -0000 1.9 *************** *** 903,907 **** </sect2> ! <sect2 id="adv-or-mapping-s2-3"> <title>Dynabean components</title> <para> --- 903,907 ---- </sect2> ! <sect2 id="adv-or-mapping-s2-4"> <title>Dynabean components</title> <para> Index: index.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/index.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.xml 1 Jan 2003 13:46:28 -0000 1.1.1.1 --- index.xml 28 Jan 2003 13:25:11 -0000 1.2 *************** *** 22,25 **** --- 22,27 ---- <subtitle>Relational Persistence for Idiomatic Java</subtitle> <subtitle>http://hibernate.sourceforge.net/</subtitle> + <subtitle>Version: 2.0 beta1</subtitle> + <date>28.01.2003</date> </bookinfo> |
From: <tu...@us...> - 2003-01-28 13:25:13
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/html_single In directory sc8-pr-cvs1:/tmp/cvs-serv4176/html_single Modified Files: index.html Log Message: Updated doco Index: index.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/html_single/index.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.html 1 Jan 2003 13:43:51 -0000 1.1.1.1 --- index.html 28 Jan 2003 13:25:10 -0000 1.2 *************** *** 1,5 **** <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.49"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><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></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>1. <a href="#architecture">Architecture</a></dt><dd><dl><dt><a href="#architecture-s1">Overview</a></dt><dt><a href="#architecture-s2">Persistent Object Identity</a></dt><dt><a href="#architecture-s3">JMX Integration</a></dt></dl></dd><dt>2. <a href="#session-configuration">SessionFactory Configuration</a></dt><dd><dl><dt><a href="#session-configuration-s1">Programmatic Datastore Configuration</a></dt><dt><a href="#session-configuration-s2">Obtaining a SessionFactory</a></dt><dt><a href="#session-configuration-s3">User provided JDBC connection</a></dt><dt><a href="#session-configuration-s4">Hibernate provided JDBC connection</a></dt><dt><a href="#session-configuration-s5">Other properties</a></dt><dt><a href="#session-configuration-s6">XML Configuration File</a></dt><dt><a href="#session-configuration-s7">Logging</a></dt></dl></dd><dt>3. <a href="#persistent-classes">Persistent Classes</a></dt><dd><dl><dt><a href="#persistent-classes-s1">Simple Example</a></dt><dd><dl><dt><a href="#persistent-classes-s1-1">Declare accessors and mutators for persistent fields</a></dt><dt><a href="#persistent-classes-s1-2">Implement a default constructor</a></dt><dt><a href="#persistent-classes-s1-3">Provide an identifier property (optional)</a></dt></dl></dd><dt><a href="#persistent-classes-s2">Inheritance</a></dt><dt><a href="#persistent-classes-s3">Persistent Lifecycle Callbacks</a></dt><dt><a href="#persistent-classes-s4">Validatable</a></dt></dl></dd><dt>4. <a href="#or-mapping">Basic O/R Mapping</a></dt><dd><dl><dt><a href="#or-mapping-s1">Mapping declaration</a></dt><dd><dl><dt><a href="#or-mapping-s1-1">Doctype</a></dt><dt><a href="#or-mapping-s1-2">hibernate-mapping</a></dt><dt><a href="#or-mapping-s1-3">class</a></dt><dt><a href="#or-mapping-s1-4">id</a></dt><dt><a href="#or-mapping-s1-4b">composite-id</a></dt><dt><a href="#or-mapping-s1-5">discriminator</a></dt><dt><a href="#or-mapping-s1-6">version (optional)</a></dt><dt><a href="#or-mapping-s1-6b">timestamp (optional)</a></dt><dt><a href="#or-mapping-s1-7">property</a></dt><dt><a href="#or-mapping-s1-8">many-to-one</a></dt><dt><a href="#or-mapping-s1-9">one-to-one</a></dt><dt><a href="#or-mapping-s1-10">component</a></dt><dt><a href="#or-mapping-s1-11">subclass</a></dt><dt><a href="#or-mapping-s1-11b">joined-subclass</a></dt><dt><a href="#or-mapping-s1-12">map, set, list, bag</a></dt></dl></dd><dt><a href="#or-mapping-s2">Hibernate Types</a></dt><dd><dl><dt><a href="#or-mapping-s2-1">Entities and values</a></dt><dt><a href="#or-mapping-s2-2">Basic value types</a></dt><dt><a href="#or-mapping-s2-3">Persistent enum types</a></dt><dt><a href="#or-mapping-s2-4">Custom value types</a></dt><dt><a href="#or-mapping-s2-5">The object type</a></dt></dl></dd></dl></dd><dt>5. <a href="#adv-or-mapping">Advanced O/R Mapping</a></dt><dd><dl><dt><a href="#adv-or-mapping-s1">Collections</a></dt><dd><dl><dt><a href="#adv-or-mapping-s1-1">Persistent Collection Styles</a></dt><dt><a href="#adv-or-mapping-s1-2">Toplevel and Nested Collections</a></dt><dt><a href="#adv-or-mapping-s1-3">Mapping a Collection</a></dt><dt><a href="#adv-or-mapping-s1-4">Mapping a Property to a Toplevel Collection</a></dt><dt><a href="#adv-or-mapping-s1-5">Collections of Values and Many To Many Associations</a></dt><dt><a href="#adv-or-mapping-s1-6">One To Many Associations</a></dt><dt><a href="#adv-or-mapping-s1-7">Lazy Initialization</a></dt><dt><a href="#adv-or-mapping-s1-8">Sorted Collections</a></dt><dt><a href="#adv-or-mapping-s1-9">Garbage Collection</a></dt><dt><a href="#adv-or-mapping-s1-10">Bidirectional Associations</a></dt><dt><a href="#adv-or-mapping-s1-11">Ternary Associations</a></dt><dt><a href="#adv-or-mapping-s1-12">Collection Example</a></dt></dl></dd><dt><a href="#adv-or-mapping-s2">Components</a></dt><dd><dl><dt><a href="#adv-or-mapping-s2-1">As Dependent Objects</a></dt><dt><a href="#adv-or-mapping-s2-2">In Collections</a></dt><dt><a href="#adv-or-mapping-s2-2b">As a Map Index</a></dt><dt><a href="#adv-or-mapping-s2-3">As Composite Identifiers</a></dt></dl></dd><dt><a href="#adv-or-mapping-s3">Cache</a></dt><dd><dl><dt><a href="#adv-or-mapping-s3-1">Mapping</a></dt><dt><a href="#adv-or-mapping-s3-2">Read Only Cache</a></dt><dt><a href="#adv-or-mapping-s3-3">Read / Write Cache</a></dt></dl></dd><dt><a href="#adv-or-mapping-s4">Proxies for Lazy Initialization</a></dt></dl></dd><dt>6. <a href="#manipulating-data">Manipulating Persistent Data</a></dt><dd><dl><dt><a href="#manipulating-data-s1">Creating a persistent object</a></dt><dt><a href="#manipulating-data-s2">Loading an object</a></dt><dt><a href="#manipulating-data-s3">Querying</a></dt><dd><dl><dt><a href="#manipulating-data-s4">Scalar queries</a></dt><dt><a href="#manipulating-data-s5">The Query interface</a></dt><dt><a href="#manipulating-data-s5b">Scrollable iteration</a></dt><dt><a href="#manipulating-data-s6">Filtering collections</a></dt></dl></dd><dt><a href="#manipulating-data-s7">Updating objects saved or loaded in the current session</a></dt><dt><a href="#manipulating-data-s8">Updating objects saved or loaded in a previous session</a></dt><dt><a href="#manipulating-data-s9">Deleting persistent objects</a></dt><dt><a href="#manipulating-data-s10">Graphs of objects</a></dt><dd><dl><dt><a href="#manipulating-data-s11a">Lifecycle objects</a></dt><dt><a href="#manipulating-data-s11b">Persistence by Reachability</a></dt></dl></dd><dt><a href="#manipulating-data-s12">Flushing</a></dt><dt><a href="#manipulating-data-s13">Ending a Session</a></dt><dd><dl><dt><a href="#manipulating-data-s13-1">Flushing the session</a></dt><dt><a href="#manipulating-data-s13-2">Committing the transaction</a></dt><dt><a href="#manipulating-data-s13-3">Closing the session</a></dt><dt><a href="#manipulating-data-s13-4">Exception handling</a></dt></dl></dd><dt><a href="#manipulating-data-s14">Interceptors</a></dt></dl></dd><dt>7. <a href="#query-language">Hibernate Query Language</a></dt><dd><dl><dt><a href="#query-language-s1">Case Sensitivity</a></dt><dt><a href="#query-language-s2">The from clause</a></dt><dt><a href="#query-language-s3">The select clause</a></dt><dt><a href="#query-language-s3b">polymorphism</a></dt><dt><a href="#query-language-s4">from collections</a></dt><dt><a href="#query-language-s5">The where clause</a></dt><dt><a href="#query-language-s6">Expressions</a></dt><dt><a href="#query-language-s7">The order by clause</a></dt><dt><a href="#query-language-s8">The group by clause</a></dt><dt><a href="#query-language-s9">Subqueries</a></dt></dl></dd><dt>8. <a href="#transactions">Transactions And Concurrency</a></dt><dd><dl><dt><a href="#transactions-s1">Datastores, Sessions and Factories</a></dt><dt><a href="#transactions-s2">Threads and connections</a></dt><dt><a href="#transactions-s3">Optimistic Locking / Versioning</a></dt><dd><dl><dt><a href="#transactions-s3-1">Long session with automatic versioning</a></dt><dt><a href="#transactions-s3-2">Many sessions with automatic versioning</a></dt><dt><a href="#transactions-s3-3">Application version checking</a></dt></dl></dd><dt><a href="#transactions-s4">Session disconnection</a></dt><dt><a href="#transactions-s5">Pessimistic Locking</a></dt></dl></dd><dt>9. <a href="#examples">Examples</a></dt><dd><dl><dt><a href="#examples-s0">Employer / Employee</a></dt><dt><a href="#examples-s1">Author / Work</a></dt><dt><a href="#examples-s2">Customer / Order / Product</a></dt></dl></dd><dt>10. <a href="#best-practices">Best Practices</a></dt></dl></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-s1">Overview</a></dt><dt><a href="#architecture-s2">Persistent Object Identity</a></dt><dt><a href="#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> --- 1,5 ---- <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.49"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><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><div><h2 class="subtitle">Version: 2.0 beta1</h2></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>1. <a href="#architecture">Architecture</a></dt><dd><dl><dt><a href="#architecture-s1">Overview</a></dt><dt><a href="#architecture-s2">Persistent Object Identity</a></dt><dt><a href="#architecture-s3">JMX Integration</a></dt></dl></dd><dt>2. <a href="#session-configuration">SessionFactory Configuration</a></dt><dd><dl><dt><a href="#session-configuration-s1">Programmatic Configuration</a></dt><dt><a href="#session-configuration-s2">Obtaining a SessionFactory</a></dt><dt><a href="#session-configuration-s3">User provided JDBC connection</a></dt><dt><a href="#session-configuration-s4">Hibernate provided JDBC connection</a></dt><dt><a href="#session-configuration-s5">Other properties</a></dt><dt><a href="#session-configuration-s6">XML Configuration File</a></dt><dt><a href="#session-configuration-s7">Logging</a></dt></dl></dd><dt>3. <a href="#persistent-classes">Persistent Classes</a></dt><dd><dl><dt><a href="#persistent-classes-s1">Simple Example</a></dt><dd><dl><dt><a href="#persistent-classes-s1-1">Declare accessors and mutators for persistent fields</a></dt><dt><a href="#persistent-classes-s1-2">Implement a default constructor</a></dt><dt><a href="#persistent-classes-s1-3">Provide an identifier property (optional)</a></dt></dl></dd><dt><a href="#persistent-classes-s2">Inheritance</a></dt><dt><a href="#persistent-classes-s3">Persistent Lifecycle Callbacks</a></dt><dt><a href="#persistent-classes-s4">Validatable</a></dt></dl></dd><dt>4. <a href="#or-mapping">Basic O/R Mapping</a></dt><dd><dl><dt><a href="#or-mapping-s1">Mapping declaration</a></dt><dd><dl><dt><a href="#or-mapping-s1-1">Doctype</a></dt><dt><a href="#or-mapping-s1-2">hibernate-mapping</a></dt><dt><a href="#or-mapping-s1-3">class</a></dt><dt><a href="#or-mapping-s1-4">id</a></dt><dt><a href="#or-mapping-s1-4b">composite-id</a></dt><dt><a href="#or-mapping-s1-5">discriminator</a></dt><dt><a href="#or-mapping-s1-6">version (optional)</a></dt><dt><a href="#or-mapping-s1-6b">timestamp (optional)</a></dt><dt><a href="#or-mapping-s1-7">property</a></dt><dt><a href="#or-mapping-s1-8">many-to-one</a></dt><dt><a href="#or-mapping-s1-9">one-to-one</a></dt><dt><a href="#or-mapping-s1-10">component, dynabean</a></dt><dt><a href="#or-mapping-s1-11">subclass</a></dt><dt><a href="#or-mapping-s1-11b">joined-subclass</a></dt><dt><a href="#or-mapping-s1-12">map, set, list, bag</a></dt></dl></dd><dt><a href="#or-mapping-s2">Hibernate Types</a></dt><dd><dl><dt><a href="#or-mapping-s2-1">Entities and values</a></dt><dt><a href="#or-mapping-s2-2">Basic value types</a></dt><dt><a href="#or-mapping-s2-3">Persistent enum types</a></dt><dt><a href="#or-mapping-s2-4">Custom value types</a></dt><dt><a href="#or-mapping-s2-5">The object type</a></dt></dl></dd></dl></dd><dt>5. <a href="#adv-or-mapping">Advanced O/R Mapping</a></dt><dd><dl><dt><a href="#adv-or-mapping-s1">Collections</a></dt><dd><dl><dt><a href="#adv-or-mapping-s1-1">Persistent Collections</a></dt><dt><a href="#adv-or-mapping-s1-3">Mapping a Collection</a></dt><dt><a href="#adv-or-mapping-s1-5">Collections of Values and Many To Many Associations</a></dt><dt><a href="#adv-or-mapping-s1-6">One To Many Associations</a></dt><dt><a href="#adv-or-mapping-s1-7">Lazy Initialization</a></dt><dt><a href="#adv-or-mapping-s1-8">Sorted Collections</a></dt><dt><a href="#adv-or-mapping-s1-9">Garbage Collection</a></dt><dt><a href="#adv-or-mapping-s1-10">Bidirectional Associations</a></dt><dt><a href="#adv-or-mapping-s1-11">Ternary Associations</a></dt><dt><a href="#adv-or-mapping-s1-12">Collection Example</a></dt></dl></dd><dt><a href="#adv-or-mapping-s2">Components</a></dt><dd><dl><dt><a href="#adv-or-mapping-s2-1">As Dependent Objects</a></dt><dt><a href="#adv-or-mapping-s2-2">In Collections</a></dt><dt><a href="#adv-or-mapping-s2-2b">As a Map Index</a></dt><dt><a href="#adv-or-mapping-s2-3">As Composite Identifiers</a></dt><dt><a href="#adv-or-mapping-s2-4">Dynabean components</a></dt></dl></dd><dt><a href="#adv-or-mapping-s3">Cache</a></dt><dd><dl><dt><a href="#adv-or-mapping-s3-1">Mapping</a></dt><dt><a href="#adv-or-mapping-s3-2">Read Only Cache</a></dt><dt><a href="#adv-or-mapping-s3-3">Read / Write Cache</a></dt></dl></dd><dt><a href="#adv-or-mapping-s4">Proxies for Lazy Initialization</a></dt></dl></dd><dt>6. <a href="#manipulating-data">Manipulating Persistent Data</a></dt><dd><dl><dt><a href="#manipulating-data-s1">Creating a persistent object</a></dt><dt><a href="#manipulating-data-s2">Loading an object</a></dt><dt><a href="#manipulating-data-s3">Querying</a></dt><dd><dl><dt><a href="#manipulating-data-s4">Scalar queries</a></dt><dt><a href="#manipulating-data-s5">The Query interface</a></dt><dt><a href="#manipulating-data-s5b">Scrollable iteration</a></dt><dt><a href="#manipulating-data-s6">Filtering collections</a></dt></dl></dd><dt><a href="#manipulating-data-s7">Updating objects saved or loaded in the current session</a></dt><dt><a href="#manipulating-data-s8">Updating objects saved or loaded in a previous session</a></dt><dt><a href="#manipulating-data-s9">Deleting persistent objects</a></dt><dt><a href="#manipulating-data-s10">Graphs of objects</a></dt><dd><dl><dt><a href="#manipulating-data-s11a">Lifecycle objects</a></dt><dt><a href="#manipulating-data-s11b">Persistence by Reachability</a></dt></dl></dd><dt><a href="#manipulating-data-s12">Flushing</a></dt><dt><a href="#manipulating-data-s13">Ending a Session</a></dt><dd><dl><dt><a href="#manipulating-data-s13-1">Flushing the session</a></dt><dt><a href="#manipulating-data-s13-2">Committing the transaction</a></dt><dt><a href="#manipulating-data-s13-3">Closing the session</a></dt><dt><a href="#manipulating-data-s13-4">Exception handling</a></dt></dl></dd><dt><a href="#manipulating-data-s14">Interceptors</a></dt></dl></dd><dt>7. <a href="#query-language">Hibernate Query Language</a></dt><dd><dl><dt><a href="#query-language-s1">Case Sensitivity</a></dt><dt><a href="#query-language-s2">The from clause</a></dt><dt><a href="#query-language-s3">The select clause</a></dt><dt><a href="#query-language-s3b">polymorphism</a></dt><dt><a href="#query-language-s4">from collections</a></dt><dt><a href="#query-language-s5">The where clause</a></dt><dt><a href="#query-language-s6">Expressions</a></dt><dt><a href="#query-language-s7">The order by clause</a></dt><dt><a href="#query-language-s8">The group by clause</a></dt><dt><a href="#query-language-s9">Subqueries</a></dt></dl></dd><dt>8. <a href="#transactions">Transactions And Concurrency</a></dt><dd><dl><dt><a href="#transactions-s1">Configurations, Sessions and Factories</a></dt><dt><a href="#transactions-s2">Threads and connections</a></dt><dt><a href="#transactions-s3">Optimistic Locking / Versioning</a></dt><dd><dl><dt><a href="#transactions-s3-1">Long session with automatic versioning</a></dt><dt><a href="#transactions-s3-2">Many sessions with automatic versioning</a></dt><dt><a href="#transactions-s3-3">Application version checking</a></dt></dl></dd><dt><a href="#transactions-s4">Session disconnection</a></dt><dt><a href="#transactions-s5">Pessimistic Locking</a></dt></dl></dd><dt>9. <a href="#examples">Examples</a></dt><dd><dl><dt><a href="#examples-s0">Employer / Employee</a></dt><dt><a href="#examples-s1">Author / Work</a></dt><dt><a href="#examples-s2">Customer / Order / Product</a></dt></dl></dd><dt>10. <a href="#best-practices">Best Practices</a></dt></dl></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-s1">Overview</a></dt><dt><a href="#architecture-s2">Persistent Object Identity</a></dt><dt><a href="#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: [...1697 lines suppressed...] a last-resort. If you can't use the built-in connections providers, consider providing your ! own implementation of <tt>cirrus.hibernate.connection.ConnectionProvider</tt>. </p></dd><dt><span class="term">Consider using a custom type.</span></dt><dd><p> Suppose you have a Java type, say from some library, that needs to be persisted but doesn't provide the accessors needed to map it as a component. You should consider implementing ! <tt>cirrus.hibernate.UserType</tt>. This approach frees the application code from implementing transformations to / from a Hibernate type. </p></dd><dt><span class="term">Use hand-coded JDBC in bottlenecks.</span></dt><dd><p> --- 3284,3293 ---- Hibernate lets the application manage JDBC connections. This approach should be considered a last-resort. If you can't use the built-in connections providers, consider providing your ! own implementation of <tt>net.sf.hibernate.connection.ConnectionProvider</tt>. </p></dd><dt><span class="term">Consider using a custom type.</span></dt><dd><p> Suppose you have a Java type, say from some library, that needs to be persisted but doesn't provide the accessors needed to map it as a component. You should consider implementing ! <tt>net.sf.hibernate.UserType</tt>. This approach frees the application code from implementing transformations to / from a Hibernate type. </p></dd><dt><span class="term">Use hand-coded JDBC in bottlenecks.</span></dt><dd><p> |
From: <one...@us...> - 2003-01-28 13:07:46
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv25818 Modified Files: changelog.txt readme.txt Log Message: latest fixes Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/changelog.txt,v retrieving revision 1.295 retrieving revision 1.296 diff -C2 -d -r1.295 -r1.296 *** changelog.txt 4 Jan 2003 13:05:14 -0000 1.295 --- changelog.txt 28 Jan 2003 13:07:43 -0000 1.296 *************** *** 1,4 **** --- 1,18 ---- Hibernate Changelog =================== + Changes in version 1.2.3 (28.1.2003) + ------------------------------------ + * fixed a recently-introduced problem with Timestamp dirty checking + * added createClob(), createBlob() for streams (Benoit Menendez) + * SchemaUpdate now configures Dialect correctly (Michael Locher) + * update() now working for classes with embedded composite ids + * unsaved-value attribute now recognized for <composite-id> + * fixed a minor problem where a very specific kind of SQL select did not qualify a column name + * added Query.getQueryString() + * fixed an NPE that sometimes occurred when hibernate.connection.username was not specified + * fixed a bug in SchemaExport where foreign key constraints did not use qualified tablenames + * added isFirst(), isLast() to ScrollableResults + * fixed bug finding properties inherited by mapped interfaces + Changes in version 1.2.2 (4.1.2003) -------------------------------------- Index: readme.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/readme.txt,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** readme.txt 4 Jan 2003 13:05:14 -0000 1.58 --- readme.txt 28 Jan 2003 13:07:43 -0000 1.59 *************** *** 1,5 **** Hibernate - Relational Persistence for Idiomatic Java ===================================================== ! version 1.2.2 4 January 2003 Instructions --- 1,5 ---- Hibernate - Relational Persistence for Idiomatic Java ===================================================== ! version 1.2.3 28 January 2003 Instructions |
From: <one...@us...> - 2003-01-28 13:06:59
|
Update of /cvsroot/hibernate/Hibernate2 In directory sc8-pr-cvs1:/tmp/cvs-serv25579 Modified Files: readme.txt Log Message: 2.0 beta 1 Index: readme.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/readme.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** readme.txt 1 Jan 2003 13:42:58 -0000 1.1.1.1 --- readme.txt 28 Jan 2003 13:06:56 -0000 1.2 *************** *** 1,5 **** Hibernate - Relational Persistence for Idiomatic Java ===================================================== ! version 1.2.1b 1 January 2003 Instructions --- 1,5 ---- Hibernate - Relational Persistence for Idiomatic Java ===================================================== ! version 2.0 beta 1 28 January 2003 Instructions |
From: <one...@us...> - 2003-01-28 13:05:31
|
Update of /cvsroot/hibernate/Hibernate2 In directory sc8-pr-cvs1:/tmp/cvs-serv24860 Modified Files: changelog.txt Log Message: new features Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/changelog.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** changelog.txt 5 Jan 2003 02:11:19 -0000 1.4 --- changelog.txt 28 Jan 2003 13:05:28 -0000 1.5 *************** *** 1,7 **** Hibernate Changelog =================== ! Changed in version 2.0 beta 1 ! ----------------------------- * renamed packages to net.sf.hibernate.* * removed support for toplevel collections / subcollections * created hibernate-mapping-2.0.dtd --- 1,8 ---- Hibernate Changelog =================== ! Changed in version 2.0 beta 1 (28.1.2003) ! ----------------------------------------- * renamed packages to net.sf.hibernate.* + * all API methods now wrap SQLExceptions * removed support for toplevel collections / subcollections * created hibernate-mapping-2.0.dtd *************** *** 9,12 **** --- 10,22 ---- - renamed 'role' attribute to 'name' - changed default value for 'unsaved-value' to "null" + - added mandatory 'name' attribute to <param> + - added <meta> tag + * created hibernate-configuration-2.0.dtd + * brand new Configuration API, including exposed mapping package + * completely reworked IdentifierGenerator framework + - built-in generators now auto-detect the type (so integer identity columns are supported, for example) + - parameters are now named + - built-in strategies are renamed + * expanded Interceptor interface * removed exceptions that occur if an object is saved or deleted multiple times in a session * added <parent> subelement to <composite-element> and <nested-composite-element> *************** *** 14,17 **** --- 24,46 ---- * removed all deprecated methods * added Session.refresh() + * added dynamic-update functionality + * added update and insert attributes to <property> and <many-to-one> mappings + * added elements(), indices(), size(), maxelement(), minelement(), maxindex(), minindex() collection functions to query language + * huge improvements to CodeGenerator (Max Andersen) + * enhanced outerjoin fetching support in queries + + Changes in version 1.2.3 (28.1.2003) + ------------------------------------ + * fixed a recently-introduced problem with Timestamp dirty checking + * added createClob(), createBlob() for streams (Benoit Menendez) + * SchemaUpdate now configures Dialect correctly (Michael Locher) + * update() now working for classes with embedded composite ids + * unsaved-value attribute now recognized for <composite-id> + * fixed a minor problem where a very specific kind of SQL select did not qualify a column name + * added Query.getQueryString() + * fixed an NPE that sometimes occurred when hibernate.connection.username was not specified + * fixed a bug in SchemaExport where foreign key constraints did not use qualified tablenames + * added isFirst(), isLast() to ScrollableResults + * fixed bug finding properties inherited by mapped interfaces Changes in version 1.2.1b (4.1.2003) |
From: <one...@us...> - 2003-01-28 13:03:05
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv23810/reference/src Modified Files: basic_or_mapping.xml session_configuration.xml Log Message: documented new mapping attributes Index: basic_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/basic_or_mapping.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** basic_or_mapping.xml 28 Jan 2003 12:15:51 -0000 1.5 --- basic_or_mapping.xml 28 Jan 2003 13:03:00 -0000 1.6 *************** *** 94,97 **** --- 94,98 ---- schema="owner" proxy="ProxyInterface" + dynamic-update="true|false" polymorphism="implicit|explicit" persister="PersisterClass" />]]></programlisting> *************** *** 139,142 **** --- 140,150 ---- <listitem> <para> + <literal>dynamic-update</literal> (optional, defaults to <literal>false</literal>): + Specifies that <literal>UPDATE</literal> SQL should be generated at runtime and + contain only those columns whose values have changed. + </para> + </listitem> + <listitem> + <para> <literal>polymorphism</literal> (optional, defaults to <literal>implicit</literal>): Determines whether implicit or explicit query polymorphism is used. *************** *** 596,600 **** name="propertyName" column="column_name" ! type="typename"/>]]></programlisting> <para> --- 604,610 ---- name="propertyName" column="column_name" ! type="typename" ! update="true|false" ! insert="true|false"/>]]></programlisting> <para> *************** *** 621,624 **** --- 631,643 ---- </para> </listitem> + <listitem> + <para> + <literal>update, insert</literal> (optional - defaults to <literal>true</literal>) + specifies that the mapped columns should be included in SQL <literal>UPDATE</literal> + and/or <literal>INSERT</literal> statements. Setting both to <literal>false</literal> + allows a pure "derived" property whose value is initialized from some other + property that maps to the same colum(s) or by a trigger or other application. + </para> + </listitem> </itemizedlist> *************** *** 676,684 **** <programlisting><![CDATA[<many-to-one ! name="propertyName" ! column="column_name" ! class="ClassName" ! cascade="all|none|save-update|delete" ! outer-join="true|false|auto"/>]]></programlisting> <para> --- 695,705 ---- <programlisting><![CDATA[<many-to-one ! name="propertyName" ! column="column_name" ! class="ClassName" ! cascade="all|none|save-update|delete" ! outer-join="true|false|auto" ! update="true|false" ! insert="true|false"/>]]></programlisting> <para> *************** *** 715,718 **** --- 736,748 ---- enables outer-join fetching for this association when <literal>hibernate.use_outer_join</literal> is set. + </para> + </listitem> + <listitem> + <para> + <literal>update, insert</literal> (optional - defaults to <literal>true</literal>) + specifies that the mapped columns should be included in SQL <literal>UPDATE</literal> + and/or <literal>INSERT</literal> statements. Setting both to <literal>false</literal> + allows a pure "derived" association whose value is initialized from some other + property that maps to the same colum(s) or by a trigger or other application. </para> </listitem> Index: session_configuration.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/session_configuration.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** session_configuration.xml 26 Jan 2003 03:17:45 -0000 1.2 --- session_configuration.xml 28 Jan 2003 13:03:01 -0000 1.3 *************** *** 538,542 **** "-//Hibernate/Hibernate Configuration DTD//EN" ! "http://hibernate.sourceforge.net/hibernate-configuration.dtd"> <hibernate-configuration> --- 538,542 ---- "-//Hibernate/Hibernate Configuration DTD//EN" ! "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> <hibernate-configuration> *************** *** 545,549 **** <session-factory name="/jndi/name"> ! <!-- properties for this SessionFactory only --> <property name="connection.datasource">my/first/datasource</property> <property name="dialect">net.sf.hibernate.sql.MySQLDialect</property> --- 545,549 ---- <session-factory name="/jndi/name"> ! <!-- properties --> <property name="connection.datasource">my/first/datasource</property> <property name="dialect">net.sf.hibernate.sql.MySQLDialect</property> |
From: <tu...@us...> - 2003-01-28 12:15:54
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv6333 Modified Files: advanced_or_mapping.xml basic_or_mapping.xml Log Message: Typos fixed Index: advanced_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/advanced_or_mapping.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** advanced_or_mapping.xml 28 Jan 2003 10:35:52 -0000 1.7 --- advanced_or_mapping.xml 28 Jan 2003 12:15:51 -0000 1.8 *************** *** 75,83 **** Collections may contain almost any other Hibernate type, including all basic types, custom types, entity types and components. Collections may not contain other ! collections. The contained type is referred to as the emphasis>collection element type</emphasis>. Collection elements are mapped by using <literal><element></literal>, <literal><composite-element></literal>, <literal><one-to-many></literal> or <literal><many-to-many></literal>. - </para> </para> --- 75,82 ---- Collections may contain almost any other Hibernate type, including all basic types, custom types, entity types and components. Collections may not contain other ! collections. The contained type is referred to as the <emphasis>collection element type</emphasis>. Collection elements are mapped by using <literal><element></literal>, <literal><composite-element></literal>, <literal><one-to-many></literal> or <literal><many-to-many></literal>. </para> Index: basic_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/basic_or_mapping.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** basic_or_mapping.xml 28 Jan 2003 10:35:52 -0000 1.4 --- basic_or_mapping.xml 28 Jan 2003 12:15:51 -0000 1.5 *************** *** 847,851 **** <para> ! The <literal><dynabean></literal> element allows a <literal>DynaBean</literal> to be mapped as a component. Please see the documentation for Apache Jakarta commons-beanutils for more information about <literal>DynaBean</literal>s. --- 847,851 ---- <para> ! The <literal><dynabean></literal> element allows a <literal>DynaBean</literal> to be mapped as a component. Please see the documentation for Apache Jakarta commons-beanutils for more information about <literal>DynaBean</literal>s. |
From: <one...@us...> - 2003-01-28 10:35:54
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv3162/reference/src Modified Files: advanced_or_mapping.xml basic_or_mapping.xml query_language.xml Log Message: doco updates for new APIs Index: advanced_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/advanced_or_mapping.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** advanced_or_mapping.xml 17 Jan 2003 08:38:05 -0000 1.6 --- advanced_or_mapping.xml 28 Jan 2003 10:35:52 -0000 1.7 *************** *** 903,907 **** --- 903,927 ---- </sect2> + + <sect2 id="adv-or-mapping-s2-3"> + <title>Dynabean components</title> + <para> + You may even map a property of type <literal>DynaBean</literal>: + </para> + + <programlisting><![CDATA[<dynabean name="userAttributes" dynaclass="UserAttributes"> + <property name="foo" column="FOO"/> + <property name="bar" column="BAR"/> + <many-to-one name="baz" class="eg.Baz" column="BAZ"/> + </dynabean>]]></programlisting> + <para> + The semantics of a <literal><dynabean></literal> mapping are identical + to <literal><component></literal>. The advantage of this kind of mapping + is the ability to determine the actual properties of the bean at deployment time + by editting the mapping document. (Runtime manipulation of the mapping document + is also possible, using a DOM parser.) + </para> + </sect2> </sect1> Index: basic_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/basic_or_mapping.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** basic_or_mapping.xml 16 Jan 2003 20:55:25 -0000 1.3 --- basic_or_mapping.xml 28 Jan 2003 10:35:52 -0000 1.4 *************** *** 813,817 **** <sect2 id="or-mapping-s1-10"> ! <title>component</title> <para> --- 813,817 ---- <sect2 id="or-mapping-s1-10"> ! <title>component, dynabean</title> <para> *************** *** 844,847 **** --- 844,853 ---- The child <literal><property></literal> tags map properties of the child class to table columns. + </para> + + <para> + The <literal><dynabean></literal> element allows a <literal>DynaBean</literal> + to be mapped as a component. Please see the documentation for Apache Jakarta + commons-beanutils for more information about <literal>DynaBean</literal>s. </para> </sect2> Index: query_language.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/query_language.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** query_language.xml 1 Jan 2003 13:46:33 -0000 1.1.1.1 --- query_language.xml 28 Jan 2003 10:35:52 -0000 1.2 *************** *** 29,33 **** <para> ! which simply selects all instances of the class <literal>eg.Cat</literal>. </para> </sect1> --- 29,35 ---- <para> ! which simply returns all instances of the class <literal>eg.Cat</literal>. The ! query assigns the alias <literal>cat</literal> to <literal>Cat</literal> ! instances, so we could use that alias later in the query. </para> </sect1> |
From: <one...@us...> - 2003-01-28 10:24:25
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv27863/sf/hibernate Added Files: hibernate-configuration-2.0.dtd Removed Files: hibernate-configuration.dtd Log Message: new cfg.xml version --- NEW FILE: hibernate-configuration-2.0.dtd --- <!-- Hibernate file-based configuration document. <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> An instance of this document contains property settings and references to mapping files for a number of SessionFactory instances to be listed in JNDI. --> <ELEMENT hibernate-configuration (session-factory)> <!ELEMENT property (#PCDATA)> <!ATTLIST property name CDATA #REQUIRED> <!ELEMENT mapping EMPTY> <!-- reference to a mapping file --> <!ATTLIST mapping resource CDATA #IMPLIED> <!ATTLIST mapping file CDATA #IMPLIED> <!ATTLIST mapping jar CDATA #IMPLIED> <!ELEMENT session-factory (property*, mapping+)> <!ATTLIST session-factory name CDATA #REQUIRED> <!-- the JNDI name --> --- hibernate-configuration.dtd DELETED --- |
From: <one...@us...> - 2003-01-28 10:22:52
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cfg In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate/cfg Modified Files: Binder.java Configuration.java Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: Binder.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cfg/Binder.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Binder.java 27 Jan 2003 12:39:34 -0000 1.3 --- Binder.java 28 Jan 2003 10:22:19 -0000 1.4 *************** *** 205,210 **** bindValue(subnode, id, false, propertyName); id.setTypeByReflection( model.getPersistentClass(), propertyName ); ! Property prop = new Property(); ! bindProperty(subnode, prop, id, mappings); model.setIdentifierProperty(prop); } --- 205,210 ---- bindValue(subnode, id, false, propertyName); id.setTypeByReflection( model.getPersistentClass(), propertyName ); ! Property prop = new Property(id); ! bindProperty(subnode, prop, mappings); model.setIdentifierProperty(prop); } *************** *** 225,230 **** Class reflectedClass = ReflectHelper.getGetter( model.getPersistentClass(), propertyName ).getReturnType(); bindComponent(subnode, id, reflectedClass, null, false, mappings); ! Property prop = new Property(); ! bindProperty(subnode, prop, id, mappings); model.setIdentifierProperty(prop); } --- 225,230 ---- Class reflectedClass = ReflectHelper.getGetter( model.getPersistentClass(), propertyName ).getReturnType(); bindComponent(subnode, id, reflectedClass, null, false, mappings); ! Property prop = new Property(id); ! bindProperty(subnode, prop, mappings); model.setIdentifierProperty(prop); } *************** *** 236,241 **** bindValue(subnode, val, false, propertyName); if ( val.getType()==null ) val.setType( "version".equals(name) ? Hibernate.INTEGER : Hibernate.TIMESTAMP ); ! Property prop = new Property(); ! bindProperty(subnode, prop, val, mappings); model.setVersion(prop); model.addProperty(prop); --- 236,241 ---- bindValue(subnode, val, false, propertyName); if ( val.getType()==null ) val.setType( "version".equals(name) ? Hibernate.INTEGER : Hibernate.TIMESTAMP ); ! Property prop = new Property(val); ! bindProperty(subnode, prop, mappings); model.setVersion(prop); model.addProperty(prop); *************** *** 333,340 **** } ! public static void bindProperty(Node node, Property model, Value value, Mappings mappings) throws MappingException { model.setName( Property.getPropertyName(node) ); ! model.setValue(value); ! Type type = value.getType(); if (type==null) throw new MappingException( "Could not determine a property type for: " + model.getName() ); Node cascadeNode = node.getAttributes().getNamedItem("cascade"); --- 333,339 ---- } ! public static void bindProperty(Node node, Property model, Mappings mappings) throws MappingException { model.setName( Property.getPropertyName(node) ); ! Type type = model.getValue().getType(); if (type==null) throw new MappingException( "Could not determine a property type for: " + model.getName() ); Node cascadeNode = node.getAttributes().getNamedItem("cascade"); *************** *** 343,351 **** cascadeNode.getNodeValue() ); ! Node mutableNode = node.getAttributes().getNamedItem("mutable"); ! model.setMutable( (mutableNode==null) ? true : ! "true".equals( mutableNode.getNodeValue() ) ); } --- 342,355 ---- cascadeNode.getNodeValue() ); ! Node updateNode = node.getAttributes().getNamedItem("update"); ! model.setUpdateable( (updateNode==null) ? true : ! "true".equals( updateNode.getNodeValue() ) ); + Node insertNode = node.getAttributes().getNamedItem("insert"); + model.setInsertable( (insertNode==null) ? + true : + "true".equals( insertNode.getNodeValue() ) + ); } *************** *** 358,367 **** //ROLENAME Node roleAtt = atts.getNamedItem("name"); - if (roleAtt==null) roleAtt = atts.getNamedItem("role"); String barerole = roleAtt.getNodeValue(); model.setRole( prefix + Mappings.ROLE_SEPERATOR + barerole ); Node inverseNode = atts.getNamedItem("inverse"); - if ( inverseNode==null) inverseNode = atts.getNamedItem("readonly"); if ( inverseNode!=null) model.setInverse( StringHelper.booleanValue( inverseNode.getNodeValue() ) ); --- 362,369 ---- *************** *** 645,650 **** if (componentClass!=null) value.setTypeByReflection(componentClass, propertyName); value.createForeignKey(); ! Property prop = new Property(); ! bindProperty(subnode, prop, value, mappings); model.addProperty(prop); } --- 647,652 ---- if (componentClass!=null) value.setTypeByReflection(componentClass, propertyName); value.createForeignKey(); ! Property prop = new Property(value); ! bindProperty(subnode, prop, mappings); model.addProperty(prop); } *************** *** 797,802 **** value.setTypeByReflection( model.getPersistentClass(), propertyName ); value.createForeignKey(); ! Property prop = new Property(); ! bindProperty(subnode, prop, value, mappings); model.addProperty(prop); } --- 799,804 ---- value.setTypeByReflection( model.getPersistentClass(), propertyName ); value.createForeignKey(); ! Property prop = new Property(value); ! bindProperty(subnode, prop, mappings); model.addProperty(prop); } Index: Configuration.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cfg/Configuration.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Configuration.java 27 Jan 2003 12:51:49 -0000 1.9 --- Configuration.java 28 Jan 2003 10:22:19 -0000 1.10 *************** *** 501,504 **** --- 501,524 ---- } + /** + * @see net.sf.hibernate.Interceptor#instantiate(java.lang.Class, java.io.Serializable) + */ + public Object instantiate(Class clazz, Serializable id) { + return null; + } + + /** + * @see net.sf.hibernate.Interceptor#findDirty(java.lang.Object, java.io.Serializable, java.lang.Object, java.lang.Object, java.lang.String, net.sf.hibernate.type.Type) + */ + public int[] findDirty( + Object entity, + Serializable id, + Object[] currentState, + Object[] previousState, + String[] propertyNames, + Type[] types) { + return null; + } + } |
From: <one...@us...> - 2003-01-28 10:22:52
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate Modified Files: Interceptor.java hibernate-mapping-2.0.dtd Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: Interceptor.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Interceptor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Interceptor.java 26 Jan 2003 01:33:34 -0000 1.5 --- Interceptor.java 28 Jan 2003 10:22:18 -0000 1.6 *************** *** 60,65 **** * in-memory state with the database. */ ! public void postFlush(Iterator entities); ! /** * Called when a transient entity is passed to <tt>saveOrUpdate()</tt>. The return value determines --- 60,64 ---- * in-memory state with the database. */ ! public void postFlush(Iterator entities); /** * Called when a transient entity is passed to <tt>saveOrUpdate()</tt>. The return value determines *************** *** 70,76 **** * </ul> * @param entity a transient entity ! * @return Boolean */ public Boolean isUnsaved(Object entity); } --- 69,95 ---- * </ul> * @param entity a transient entity ! * @return Boolean or <tt>null</tt> to shoose default behaviour */ public Boolean isUnsaved(Object entity); + /** + * Called from <tt>flush()</tt>. The return value determines whether the entity is updated + * <ul> + * <li>an array of property indices - the entity is dirty + * <li>and empty array - the entity is not dirty + * <li><tt>null</tt> - use Hibernate's default dirty-checking algorithm + * </ul> + * @param entity a persistent entity + * @return array of dirty property indices or <tt>null</tt> to choose default behaviour + */ + public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types); + /** + * Instantiate the entity class. Return <tt>null</tt> to indicate that Hibernate should use + * the default constructor of the class. + * + * @param clazz a mapped class + * @param id the identifier of the new instance + * @return Object an instance of the class, or <tt>null</tt> to choose default behaviour + */ + public Object instantiate(Class clazz, Serializable id); } Index: hibernate-mapping-2.0.dtd =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hibernate-mapping-2.0.dtd,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** hibernate-mapping-2.0.dtd 25 Jan 2003 00:13:55 -0000 1.12 --- hibernate-mapping-2.0.dtd 28 Jan 2003 10:22:18 -0000 1.13 *************** *** 122,126 **** <!ATTLIST property not-null (true|false) "false"> <!ATTLIST property unique (true|false) "false"> ! <!ATTLIST property mutable (true|false) "true"> <!-- only supported for properties of a class --> <!-- Declares an association between two entities (Or from a component, component element, --- 122,127 ---- <!ATTLIST property not-null (true|false) "false"> <!ATTLIST property unique (true|false) "false"> ! <!ATTLIST property update (true|false) "true"> <!-- only supported for properties of a class (not component) --> ! <!ATTLIST property insert (true|false) "true"> <!-- only supported for properties of a class (not component) --> <!-- Declares an association between two entities (Or from a component, component element, *************** *** 135,138 **** --- 136,141 ---- <!ATTLIST many-to-one cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST many-to-one outer-join (true|false|auto) "auto"> + <!ATTLIST many-to-one update (true|false) "true"> <!-- only supported for many-to-one of a class (not component) --> + <!ATTLIST many-to-one insert (true|false) "true"> <!-- only supported for many-to-one of a class (not component) --> <!-- Declares a one-to-one association between two entities (Or from a component, |
From: <one...@us...> - 2003-01-28 10:22:29
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv26630/hibernate/persister Modified Files: AbstractEntityPersister.java Log Message: added an exception Index: AbstractEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/AbstractEntityPersister.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AbstractEntityPersister.java 9 Jan 2003 09:40:19 -0000 1.20 --- AbstractEntityPersister.java 28 Jan 2003 10:22:26 -0000 1.21 *************** *** 165,168 **** --- 165,169 ---- if ( getIdentifierType().isComponentType() ) { cols = getIdentifierPropertyColumnNames(componentPath); + if (cols==null) throw new QueryException("composite id path not found (or dereferenced a <key-many-to-one>)"); } else { |
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate/test Modified Files: ABC.hbm.xml ABCProxy.hbm.xml Category.hbm.xml Circular.hbm.xml Container.hbm.xml Custom.hbm.xml CustomPersister.java Fee.hbm.xml Fo.hbm.xml FooBarTest.java Fum.hbm.xml Fumm.hbm.xml Glarch.hbm.xml Glarch.java GlarchProxy.java Holder.hbm.xml Immutable.hbm.xml Location.hbm.xml Many.hbm.xml MasterDetail.hbm.xml Nameable.hbm.xml One.hbm.xml ParentChild.hbm.xml Qux.hbm.xml Simple.hbm.xml SingleSeveral.hbm.xml Stuff.hbm.xml Vetoer.hbm.xml Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: ABC.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/ABC.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ABC.hbm.xml 9 Jan 2003 12:24:51 -0000 1.2 --- ABC.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: ABCProxy.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/ABCProxy.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ABCProxy.hbm.xml 9 Jan 2003 12:24:51 -0000 1.2 --- ABCProxy.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: Category.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Category.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Category.hbm.xml 1 Jan 2003 13:56:46 -0000 1.1.1.1 --- Category.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,18 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Category" table="category"> ! <id name="id"> ! <generator class="native"/> ! </id> ! <list role="subcategories" lazy="true" cascade="all"> ! <key column="parent"/> ! <index column="ord"/> ! <one-to-many class="net.sf.hibernate.test.Category"/> ! </list> ! <property name="name"/> </class> --- 1,18 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Category" table="category"> ! <id name="id" unsaved-value="0"> ! <generator class="native"/> ! </id> ! <list name="subcategories" lazy="true" cascade="all"> ! <key column="parent"/> ! <index column="ord"/> ! <one-to-many class="net.sf.hibernate.test.Category"/> ! </list> ! <property name="name"/> </class> Index: Circular.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Circular.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Circular.hbm.xml 1 Jan 2003 13:56:47 -0000 1.1.1.1 --- Circular.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping default-cascade="save-update"> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping default-cascade="save-update"> Index: Container.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Container.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Container.hbm.xml 27 Jan 2003 07:12:04 -0000 1.2 --- Container.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,5 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,5 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> *************** *** 8,22 **** <generator class="native" /> </id> ! <list role="oneToMany" lazy="true"> <key column = "container_id1"/> <index column = "list_index"/> <one-to-many class="net.sf.hibernate.test.Simple"/> </list> ! <list role="manyToMany" lazy="true"> <key column = "container_id2"/> <index column = "list_index"/> <many-to-many class="net.sf.hibernate.test.Simple"/> </list> ! <list role="components" lazy="true"> <key column = "container_id"/> <index column = "list_index"/> --- 8,22 ---- <generator class="native" /> </id> ! <list name="oneToMany" lazy="true"> <key column = "container_id1"/> <index column = "list_index"/> <one-to-many class="net.sf.hibernate.test.Simple"/> </list> ! <list name="manyToMany" lazy="true"> <key column = "container_id2"/> <index column = "list_index"/> <many-to-many class="net.sf.hibernate.test.Simple"/> </list> ! <list name="components" lazy="true"> <key column = "container_id"/> <index column = "list_index"/> *************** *** 28,32 **** </composite-element> </list> ! <set role="composites" lazy="true"> <key column = "container_id"/> <composite-element class="net.sf.hibernate.test.Container$ContainerInnerClass"> --- 28,32 ---- </composite-element> </list> ! <set name="composites" lazy="true"> <key column = "container_id"/> <composite-element class="net.sf.hibernate.test.Container$ContainerInnerClass"> *************** *** 37,49 **** </composite-element> </set> ! <bag role="bag" readonly="true" cascade="save-update" table="CCBAG"> <key column="container_id"/> <many-to-many column="contained_id" class="net.sf.hibernate.test.Contained" outer-join="true"/> </bag> ! <bag role="lazyBag" readonly="true" lazy="true" table="LCCBAG" cascade="save-update"> <key column="container_id"/> <many-to-many column="contained_id" class="net.sf.hibernate.test.Contained"/> </bag> ! <map role="ternaryMap"> <key column="container_id"/> <index column="idx" type="string" length="32"/> --- 37,49 ---- </composite-element> </set> ! <bag name="bag" inverse="true" cascade="save-update" table="CCBAG"> <key column="container_id"/> <many-to-many column="contained_id" class="net.sf.hibernate.test.Contained" outer-join="true"/> </bag> ! <bag name="lazyBag" inverse="true" lazy="true" table="LCCBAG" cascade="save-update"> <key column="container_id"/> <many-to-many column="contained_id" class="net.sf.hibernate.test.Contained"/> </bag> ! <map name="ternaryMap"> <key column="container_id"/> <index column="idx" type="string" length="32"/> *************** *** 54,58 **** </composite-element> </map> ! <set role="ternarySet"> <key column="container_id"/> <composite-element class="net.sf.hibernate.test.Container$Ternary"> --- 54,58 ---- </composite-element> </map> ! <set name="ternarySet"> <key column="container_id"/> <composite-element class="net.sf.hibernate.test.Container$Ternary"> *************** *** 68,76 **** <generator class="native" /> </id> ! <bag role="bag" table="CCBAG"> <key column="contained_id"/> <many-to-many column="container_id" class="net.sf.hibernate.test.Container" outer-join="false"/> </bag> ! <bag role="lazyBag" lazy="true" table="LCCBAG"> <key column="contained_id"/> <many-to-many column="container_id" class="net.sf.hibernate.test.Container"/> --- 68,76 ---- <generator class="native" /> </id> ! <bag name="bag" table="CCBAG"> <key column="contained_id"/> <many-to-many column="container_id" class="net.sf.hibernate.test.Container" outer-join="false"/> </bag> ! <bag name="lazyBag" lazy="true" table="LCCBAG"> <key column="contained_id"/> <many-to-many column="container_id" class="net.sf.hibernate.test.Container"/> Index: Custom.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Custom.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Custom.hbm.xml 9 Jan 2003 12:24:51 -0000 1.2 --- Custom.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: CustomPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/CustomPersister.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CustomPersister.java 24 Jan 2003 16:16:00 -0000 1.5 --- CustomPersister.java 28 Jan 2003 10:22:21 -0000 1.6 *************** *** 438,442 **** * @see net.sf.hibernate.persister.ClassPersister#getPropertyMutability() */ ! public boolean[] getPropertyMutability() { return MUTABILITY; } --- 438,449 ---- * @see net.sf.hibernate.persister.ClassPersister#getPropertyMutability() */ ! public boolean[] getPropertyUpdateability() { ! return MUTABILITY; ! } ! ! /** ! * @see net.sf.hibernate.persister.ClassPersister#getPropertyInsertability() ! */ ! public boolean[] getPropertyInsertability() { return MUTABILITY; } Index: Fee.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Fee.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Fee.hbm.xml 9 Jan 2003 12:24:51 -0000 1.2 --- Fee.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> *************** *** 11,15 **** <many-to-one name="anotherFee"/> <many-to-one name="qux" cascade="all"/> ! <set role="fees"> <key column="fee_id"/> <element column="str_" type="string"/> --- 11,15 ---- <many-to-one name="anotherFee"/> <many-to-one name="qux" cascade="all"/> ! <set name="fees"> <key column="fee_id"/> <element column="str_" type="string"/> Index: Fo.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Fo.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Fo.hbm.xml 1 Jan 2003 13:56:52 -0000 1.1.1.1 --- Fo.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: FooBarTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/FooBarTest.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** FooBarTest.java 26 Jan 2003 01:33:36 -0000 1.15 --- FooBarTest.java 28 Jan 2003 10:22:21 -0000 1.16 *************** *** 1238,1241 **** --- 1238,1242 ---- g2 = (GlarchProxy) s.load( Glarch.class, g2id ); assertTrue( g.getVersion()==1, "version" ); + assertTrue( g.getDerivedVersion()==1, "version" ); assertTrue( g2.getVersion()==0, "version" ); g.setName("foo"); *************** *** 1252,1255 **** --- 1253,1257 ---- g2 = (GlarchProxy) s.load( Glarch.class, g2id ); assertTrue( g.getVersion()==3, "version" ); + assertTrue( g.getDerivedVersion()==3, "version" ); assertTrue( g2.getVersion()==0, "version" ); g.setNext(null); Index: Fum.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Fum.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Fum.hbm.xml 1 Jan 2003 13:57:05 -0000 1.1.1.1 --- Fum.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,8 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Fum"> ! <composite-id name="id"> <key-property name="string"> <column name="string_" length="10"/> --- 1,8 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="net.sf.hibernate.test.Fum"> ! <composite-id name="id" unsaved-value="any"> <key-property name="string"> <column name="string_" length="10"/> *************** *** 17,21 **** <column name="fo_date"/> </many-to-one> ! <set role="friends"> <key> <column name="fr_string" length="10"/> --- 17,21 ---- <column name="fo_date"/> </many-to-one> ! <set name="friends"> <key> <column name="fr_string" length="10"/> *************** *** 25,29 **** <one-to-many class="net.sf.hibernate.test.Fum"/> </set> ! <array role="quxArray"> <key> <column name="fum_str_" length="10"/> --- 25,29 ---- <one-to-many class="net.sf.hibernate.test.Fum"/> </set> ! <array name="quxArray"> <key> <column name="fum_str_" length="10"/> Index: Fumm.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Fumm.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Fumm.hbm.xml 1 Jan 2003 13:57:05 -0000 1.1.1.1 --- Fumm.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: Glarch.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Glarch.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Glarch.hbm.xml 24 Jan 2003 16:16:01 -0000 1.3 --- Glarch.hbm.xml 28 Jan 2003 10:22:21 -0000 1.4 *************** *** 44,48 **** <one-to-many class="net.sf.hibernate.test.Glarch"/> </set> ! <property name="immutable" mutable="false"/> </class> --- 44,49 ---- <one-to-many class="net.sf.hibernate.test.Glarch"/> </set> ! <property name="immutable" update="false"/> ! <property name="derivedVersion" insert="false" update="false" column="version"/> </class> Index: Glarch.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Glarch.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Glarch.java 24 Jan 2003 16:16:02 -0000 1.5 --- Glarch.java 28 Jan 2003 10:22:21 -0000 1.6 *************** *** 31,34 **** --- 31,35 ---- private transient DynaBean dynaBean; private String immutable; + private int derivedVersion; public int getVersion() { *************** *** 174,177 **** --- 175,194 ---- public void setImmutable(String immutable) { this.immutable = immutable; + } + + /** + * Returns the derivedVersion. + * @return int + */ + public int getDerivedVersion() { + return derivedVersion; + } + + /** + * Sets the derivedVersion. + * @param derivedVersion The derivedVersion to set + */ + public void setDerivedVersion(int derivedVersion) { + this.derivedVersion = derivedVersion; } Index: GlarchProxy.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/GlarchProxy.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GlarchProxy.java 19 Jan 2003 11:47:08 -0000 1.4 --- GlarchProxy.java 28 Jan 2003 10:22:21 -0000 1.5 *************** *** 10,13 **** --- 10,14 ---- public int getVersion(); + public int getDerivedVersion(); public void setVersion(int version); Index: Holder.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Holder.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Holder.hbm.xml 1 Jan 2003 13:57:07 -0000 1.1.1.1 --- Holder.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,8 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> ! <class name="net.sf.hibernate.test.Holder"> <id name="id" column="id_" type="string" length="32" unsaved-value="null"> <generator class="uuid.hex"/> </id> <property name="name" unique="true" not-null="true" length="36"/> <list role="ones"> <key column="holder" type="string"/> <index column="i"/> <one-to-many class="net.sf.hibernate.test.One"/> </list> <array role="fooArray"> <key column="holder1" type="string"/> <index column="j1"/> <one-to-many class="net.sf.hibernate.test.Foo"/> </array> ! <set role="foos"> <key column="holder2" type="string"/> <one-to-many class="net.sf.hibernate.test.Foo"/> </set> </class> </hibernate-mapping> --- 1,8 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> ! <class name="net.sf.hibernate.test.Holder"> <id name="id" column="id_" type="string" length="32" unsaved-value="null"> <generator class="uuid.hex"/> </id> <property name="name" unique="true" not-null="true" length="36"/> <list name="ones"> <key column="holder"/> <index column="i"/> <one-to-many class="net.sf.hibernate.test.One"/> </list> <array name="fooArray"> <key column="holder1"/> <index column="j1"/> <one-to-many class="net.sf.hibernate.test.Foo"/> </array> ! <set name="foos"> <key column="holder2"/> <one-to-many class="net.sf.hibernate.test.Foo"/> </set> </class> </hibernate-mapping> Index: Immutable.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Immutable.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Immutable.hbm.xml 27 Jan 2003 07:12:04 -0000 1.2 --- Immutable.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: Location.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Location.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Location.hbm.xml 1 Jan 2003 13:57:08 -0000 1.1.1.1 --- Location.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: Many.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Many.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Many.hbm.xml 9 Jan 2003 12:24:51 -0000 1.2 --- Many.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,5 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,5 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: MasterDetail.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/MasterDetail.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MasterDetail.hbm.xml 9 Jan 2003 15:15:37 -0000 1.2 --- MasterDetail.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> *************** *** 12,28 **** <column name="big_dec" sql-type="DECIMAL(5,3)"/> </property> ! <set role="details" readonly="true" lazy="true" order-by="i asc"> <key column="master_key"/> <one-to-many class="net.sf.hibernate.test.Detail"/> </set> ! <set role="moreDetails" cascade="all" lazy="true" order-by="i desc"> <key column="more_master_key"/> <one-to-many class="net.sf.hibernate.test.Detail"/> </set> ! <set role="incoming" lazy="true" table="mtm"> <key column="outg"/> <many-to-many class="net.sf.hibernate.test.Master" column="incm"/> </set> ! <set role="outgoing" lazy="true" table="mtm" readonly="true"> <key column="incm"/> <many-to-many class="net.sf.hibernate.test.Master" column="outg"/> --- 12,28 ---- <column name="big_dec" sql-type="DECIMAL(5,3)"/> </property> ! <set name="details" inverse="true" lazy="true" order-by="i asc"> <key column="master_key"/> <one-to-many class="net.sf.hibernate.test.Detail"/> </set> ! <set name="moreDetails" cascade="all" lazy="true" order-by="i desc"> <key column="more_master_key"/> <one-to-many class="net.sf.hibernate.test.Detail"/> </set> ! <set name="incoming" lazy="true" table="mtm"> <key column="outg"/> <many-to-many class="net.sf.hibernate.test.Master" column="incm"/> </set> ! <set name="outgoing" lazy="true" table="mtm" inverse="true"> <key column="incm"/> <many-to-many class="net.sf.hibernate.test.Master" column="outg"/> *************** *** 38,42 **** <many-to-one name="master" column="master_key"/> <!--not-null="true"--> <!-- <cache timeout="10000" type="readwrite"/> --> ! <set role="subDetails" lazy="true" cascade="all"> <key column="detail_key"/> <one-to-many class="net.sf.hibernate.test.SubDetail"/> --- 38,42 ---- <many-to-one name="master" column="master_key"/> <!--not-null="true"--> <!-- <cache timeout="10000" type="readwrite"/> --> ! <set name="subDetails" lazy="true" cascade="all"> <key column="detail_key"/> <one-to-many class="net.sf.hibernate.test.SubDetail"/> Index: Nameable.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Nameable.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Nameable.hbm.xml 1 Jan 2003 13:57:12 -0000 1.1.1.1 --- Nameable.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: One.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/One.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** One.hbm.xml 9 Jan 2003 12:24:51 -0000 1.2 --- One.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,5 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,5 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> *************** *** 9,13 **** </id> <property column="one_value" name="value"/> ! <set role="manies" readonly="true" lazy="true"> <key column="one_key"/> <one-to-many class="net.sf.hibernate.test.Many"/> --- 9,13 ---- </id> <property column="one_value" name="value"/> ! <set name="manies" inverse="true" lazy="true"> <key column="one_key"/> <one-to-many class="net.sf.hibernate.test.Many"/> Index: ParentChild.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/ParentChild.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ParentChild.hbm.xml 9 Jan 2003 12:24:51 -0000 1.2 --- ParentChild.hbm.xml 28 Jan 2003 10:22:21 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> Index: Qux.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Qux.hbm.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Qux.hbm.xml 27 Jan 2003 12:12:41 -0000 1.3 --- Qux.hbm.xml 28 Jan 2003 10:22:21 -0000 1.4 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> *************** *** 16,20 **** <property name="childKey" type="long"/> <property name="stuff"/> ! <set role="fums" lazy="true"> <key column="qux_id"/> <many-to-many class="net.sf.hibernate.test.Fum"> --- 16,20 ---- <property name="childKey" type="long"/> <property name="stuff"/> ! <set name="fums" lazy="true"> <key column="qux_id"/> <many-to-many class="net.sf.hibernate.test.Fum"> *************** *** 24,28 **** </many-to-many> </set> ! <list role="moreFums" lazy="true"> <key column="qux_id"/> <index column="posn"/> --- 24,28 ---- </many-to-many> </set> ! <list name="moreFums" lazy="true"> <key column="qux_id"/> <index column="posn"/> Index: Simple.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Simple.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Simple.hbm.xml 1 Jan 2003 13:57:18 -0000 1.1.1.1 --- Simple.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd"> <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> Index: SingleSeveral.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/SingleSeveral.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SingleSeveral.hbm.xml 1 Jan 2003 13:57:18 -0000 1.1.1.1 --- SingleSeveral.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,5 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> --- 1,5 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> *************** *** 11,15 **** </composite-id> <property name="prop"/> ! <bag role="several" readonly="true" lazy="false" cascade="all"> <!--important: test for bidirectional with lazy="false" --> <key> <column name="single_id" not-null="true"/> --- 11,15 ---- </composite-id> <property name="prop"/> ! <bag name="several" inverse="true" lazy="false" cascade="all"> <!--important: test for bidirectional with lazy="false" --> <key> <column name="single_id" not-null="true"/> Index: Stuff.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Stuff.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Stuff.hbm.xml 1 Jan 2003 13:57:19 -0000 1.1.1.1 --- Stuff.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> *************** *** 9,13 **** </composite-id> <property name="name"/> ! <bag role="stuffs" readonly="true" lazy="false" cascade="all"> <key> <!--unfortunately have to specify not-null here because of limitation in schema export....--> --- 9,13 ---- </composite-id> <property name="name"/> ! <bag name="stuffs" inverse="true" lazy="false" cascade="all"> <key> <!--unfortunately have to specify not-null here because of limitation in schema export....--> Index: Vetoer.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/Vetoer.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Vetoer.hbm.xml 1 Jan 2003 13:57:21 -0000 1.1.1.1 --- Vetoer.hbm.xml 28 Jan 2003 10:22:21 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> |
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate/persister Modified Files: AbstractEntityPersister.java ClassPersister.java EntityPersister.java NormalizedEntityPersister.java Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: AbstractEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/AbstractEntityPersister.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AbstractEntityPersister.java 27 Jan 2003 07:12:03 -0000 1.10 --- AbstractEntityPersister.java 28 Jan 2003 10:22:20 -0000 1.11 *************** *** 101,105 **** private transient final String[] propertyNames; private transient final Type[] propertyTypes; ! private transient final boolean[] propertyMutability; private transient final String versionPropertyName; --- 101,106 ---- private transient final String[] propertyNames; private transient final Type[] propertyTypes; ! private transient final boolean[] propertyUpdateability; ! private transient final boolean[] propertyInsertability; private transient final String versionPropertyName; *************** *** 162,165 **** --- 163,167 ---- if ( getIdentifierType().isComponentType() ) { cols = getIdentifierPropertyColumnNames(componentPath); + if (cols==null) throw new QueryException("composite id path not found (or dereferenced a <key-many-to-one>)"); } else { *************** *** 211,217 **** */ public void setPropertyValues(Object object, Object[] values) throws HibernateException { ! for (int j=0; j<hydrateSpan; j++) { ! getSetters()[j].set(object, values[j]); ! } } --- 213,217 ---- */ public void setPropertyValues(Object object, Object[] values) throws HibernateException { ! for (int j=0; j<hydrateSpan; j++) getSetters()[j].set(object, values[j]); } *************** *** 221,227 **** public Object[] getPropertyValues(Object object) throws HibernateException { Object[] result = new Object[hydrateSpan]; ! for (int j=0; j<hydrateSpan; j++) { ! result[j] = getGetters()[j].get(object); ! } return result; } --- 221,225 ---- public Object[] getPropertyValues(Object object) throws HibernateException { Object[] result = new Object[hydrateSpan]; ! for (int j=0; j<hydrateSpan; j++) result[j] = getGetters()[j].get(object); return result; } *************** *** 245,249 **** */ public int[] findDirty(Object[] x, Object[] y, Object owner, SessionImplementor session) throws HibernateException { ! int[] props = TypeFactory.findDirty( propertyTypes, x, y, propertyMutability, owner, session.getFactory() ); if ( props==null) { return null; --- 243,247 ---- */ public int[] findDirty(Object[] x, Object[] y, Object owner, SessionImplementor session) throws HibernateException { ! int[] props = TypeFactory.findDirty( propertyTypes, x, y, propertyUpdateability, owner, session.getFactory() ); if ( props==null) { return null; *************** *** 604,608 **** propertyTypes = new Type[hydrateSpan]; propertyNames = new String[hydrateSpan]; ! propertyMutability = new boolean[hydrateSpan]; getters = new ReflectHelper.Getter[hydrateSpan]; setters = new ReflectHelper.Setter[hydrateSpan]; --- 602,607 ---- propertyTypes = new Type[hydrateSpan]; propertyNames = new String[hydrateSpan]; ! propertyUpdateability = new boolean[hydrateSpan]; ! propertyInsertability = new boolean[hydrateSpan]; getters = new ReflectHelper.Getter[hydrateSpan]; setters = new ReflectHelper.Setter[hydrateSpan]; *************** *** 621,625 **** setters[i] = ReflectHelper.getSetter( mappedClass, propertyNames[i] ); propertyTypes[i] = prop.getType(); ! propertyMutability[i] = prop.isMutable(); cascadeStyles[i] = prop.getCascadeStyle(); --- 620,625 ---- setters[i] = ReflectHelper.getSetter( mappedClass, propertyNames[i] ); propertyTypes[i] = prop.getType(); ! propertyUpdateability[i] = prop.isUpdateable(); ! propertyInsertability[i] = prop.isInsertable(); cascadeStyles[i] = prop.getCascadeStyle(); *************** *** 696,705 **** } ! public boolean[] getPropertyMutability() { ! return propertyMutability; } protected boolean useDynamicUpdate() { return dynamicUpdate; } --- 696,709 ---- } ! public boolean[] getPropertyUpdateability() { ! return propertyUpdateability; } protected boolean useDynamicUpdate() { return dynamicUpdate; + } + + public boolean[] getPropertyInsertability() { + return propertyInsertability; } Index: ClassPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/ClassPersister.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ClassPersister.java 24 Jan 2003 16:15:59 -0000 1.5 --- ClassPersister.java 28 Jan 2003 10:22:20 -0000 1.6 *************** *** 235,240 **** public String[] getPropertyNames(); ! public boolean[] getPropertyMutability(); /** * Get the cascade styles of the propertes (optional operation) --- 235,242 ---- public String[] getPropertyNames(); ! public boolean[] getPropertyUpdateability(); + public boolean[] getPropertyInsertability(); + /** * Get the cascade styles of the propertes (optional operation) Index: EntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/EntityPersister.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** EntityPersister.java 27 Jan 2003 07:12:03 -0000 1.13 --- EntityPersister.java 28 Jan 2003 10:22:20 -0000 1.14 *************** *** 22,26 **** import java.sql.SQLException; import java.util.ArrayList; - import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; --- 22,25 ---- *************** *** 75,79 **** private transient final String discriminatorColumnName; - private transient final String[] columnNames; private transient final String[] subclassColumnClosure; private transient final Type[] subclassPropertyTypeClosure; --- 74,77 ---- *************** *** 214,221 **** } - protected String[] getColumnNames() { - return columnNames; - } - //Access cached SQL --- 212,215 ---- *************** *** 264,271 **** * Generate the SQL that inserts a row */ ! protected String generateInsertString(boolean identityInsert) { Insert insert = new Insert(dialect) ! .setTableName( getTableName() ) ! .addColumns( getColumnNames() ); if ( isPolymorphic() ) insert.addColumn( getDiscriminatorColumnName(), discriminatorSQLString ); if (!identityInsert) { --- 258,267 ---- * Generate the SQL that inserts a row */ ! protected String generateInsertString(boolean identityInsert, boolean[] includeProperty) { Insert insert = new Insert(dialect) ! .setTableName( getTableName() ); ! for (int i=0; i<hydrateSpan; i++) { ! if ( includeProperty[i] ) insert.addColumns( propertyColumnNames[i] ); ! } if ( isPolymorphic() ) insert.addColumn( getDiscriminatorColumnName(), discriminatorSQLString ); if (!identityInsert) { *************** *** 412,422 **** } - //TODO: precalculate this - private boolean[] allProperties() { - boolean[] result = new boolean[hydrateSpan]; - Arrays.fill(result, true); - return result; - } - /** * Persist an object --- 408,411 ---- *************** *** 437,441 **** // insert was issued (cos of foreign key constraints). Not necessarily the object's current state ! dehydrate(id, fields, allProperties(), statement, session); session.getBatcher().addToBatch(1); --- 426,430 ---- // insert was issued (cos of foreign key constraints). Not necessarily the object's current state ! dehydrate(id, fields, getPropertyInsertability(), statement, session); session.getBatcher().addToBatch(1); *************** *** 464,468 **** try { ! dehydrate(null, fields, allProperties(), statement, session); statement.executeUpdate(); } --- 453,457 ---- try { ! dehydrate(null, fields, getPropertyInsertability(), statement, session); statement.executeUpdate(); } *************** *** 567,571 **** } else { ! update(id, fields, getPropertyMutability(), oldVersion, object, sqlUpdate(), session); } } --- 556,560 ---- } else { ! update(id, fields, getPropertyUpdateability(), oldVersion, object, sqlUpdate(), session); } } *************** *** 685,690 **** } ! columnNames = (String[]) columns.toArray(STRING_ARRAY); ! hasColumns = columnNames.length!=0; columns.clear(); --- 674,678 ---- } ! hasColumns = columns.size()!=0; columns.clear(); *************** *** 726,732 **** deleteString = generateDeleteString(); ! insertString = generateInsertString(false); ! identityInsertString = isIdentifierAssignedByInsert() ? generateInsertString(true) : null; ! updateString = generateUpdateString( getPropertyMutability() ); String lockString = generateLockString(); --- 714,722 ---- deleteString = generateDeleteString(); ! insertString = generateInsertString( false, getPropertyInsertability() ); ! identityInsertString = isIdentifierAssignedByInsert() ? ! generateInsertString( true, getPropertyInsertability() ) : ! null; ! updateString = generateUpdateString( getPropertyUpdateability() ); String lockString = generateLockString(); Index: NormalizedEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/NormalizedEntityPersister.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NormalizedEntityPersister.java 27 Jan 2003 07:12:03 -0000 1.5 --- NormalizedEntityPersister.java 28 Jan 2003 10:22:20 -0000 1.6 *************** *** 264,268 **** * Generate the SQL that inserts a row */ ! protected String[] generateInsertStrings(boolean identityInsert) { String[] result = new String[tableNames.length]; --- 264,268 ---- * Generate the SQL that inserts a row */ ! protected String[] generateInsertStrings(boolean identityInsert, boolean[] includeProperty) { String[] result = new String[tableNames.length]; *************** *** 273,277 **** for (int i=0; i<getPropertyTypes().length; i++) { ! if ( propertyTables[i]==j ) { insert.addColumns( propertyColumnNames[i] ); } --- 273,277 ---- for (int i=0; i<getPropertyTypes().length; i++) { ! if ( includeProperty[i] && propertyTables[i]==j ) { insert.addColumns( propertyColumnNames[i] ); } *************** *** 300,304 **** --- 300,306 ---- .setTableName( tableNames[j] ) .setPrimaryKeyColumnNames( tableKeyColumns[j] ); + if (j==0) update.setVersionColumnName( getVersionColumnName() ); + boolean hasColumns = false; for (int i=0; i<propertyColumnNames.length; i++) { *************** *** 308,311 **** --- 310,314 ---- } } + result[j] = hasColumns ? update.toStatementString() : null; } *************** *** 453,457 **** // insert was issued (cos of foreign key constraints). Not necessarily the object's current state ! dehydrate(id, fields, allProperties(), statements, session); for ( int i=0; i<tableNames.length; i++ ) statements[i].executeUpdate(); --- 456,460 ---- // insert was issued (cos of foreign key constraints). Not necessarily the object's current state ! dehydrate(id, fields, getPropertyInsertability(), statements, session); for ( int i=0; i<tableNames.length; i++ ) statements[i].executeUpdate(); *************** *** 612,616 **** } else { ! update(id, fields, getPropertyMutability(), tableUpdateNeeded, oldVersion, object, sqlUpdate(), session); } } --- 615,619 ---- } else { ! update(id, fields, getPropertyUpdateability(), tableUpdateNeeded, oldVersion, object, sqlUpdate(), session); } } *************** *** 828,834 **** deleteStrings = generateDeleteStrings(); ! insertStrings = generateInsertStrings(false); ! identityInsertStrings = isIdentifierAssignedByInsert() ? generateInsertStrings(true) : null; ! updateStrings = generateUpdateStrings( getPropertyMutability() ); String lockString = generateLockString(); --- 831,837 ---- deleteStrings = generateDeleteStrings(); ! insertStrings = generateInsertStrings( false, getPropertyInsertability() ); ! identityInsertStrings = isIdentifierAssignedByInsert() ? generateInsertStrings( true, getPropertyInsertability() ) : null; ! updateStrings = generateUpdateStrings( getPropertyUpdateability() ); String lockString = generateLockString(); |
From: <one...@us...> - 2003-01-28 10:22:25
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/collection In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate/collection Modified Files: ArrayHolder.java ODMGCollection.java PersistentCollection.java Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: ArrayHolder.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/collection/ArrayHolder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ArrayHolder.java 5 Jan 2003 02:11:20 -0000 1.4 --- ArrayHolder.java 28 Jan 2003 10:22:19 -0000 1.5 *************** *** 2,20 **** package net.sf.hibernate.collection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashSet; import java.util.Iterator; - import java.util.ArrayList; - import java.io.Serializable; - import java.lang.reflect.Array; - - import org.apache.commons.logging.Log; - import org.apache.commons.logging.LogFactory; import net.sf.hibernate.HibernateException; - import net.sf.hibernate.type.*; import net.sf.hibernate.engine.SessionImplementor; /** --- 2,20 ---- package net.sf.hibernate.collection; + import java.io.Serializable; + import java.lang.reflect.Array; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; + import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import net.sf.hibernate.HibernateException; import net.sf.hibernate.engine.SessionImplementor; + import net.sf.hibernate.type.Type; + + import org.apache.commons.logging.Log; + import org.apache.commons.logging.LogFactory; /** Index: ODMGCollection.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/collection/ODMGCollection.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ODMGCollection.java 14 Jan 2003 13:42:08 -0000 1.5 --- ODMGCollection.java 28 Jan 2003 10:22:19 -0000 1.6 *************** *** 10,16 **** import net.sf.hibernate.engine.SessionImplementor; ! public abstract class ODMGCollection ! extends PersistentCollection ! implements DCollection { /** --- 10,14 ---- import net.sf.hibernate.engine.SessionImplementor; ! public abstract class ODMGCollection extends PersistentCollection implements DCollection { /** Index: PersistentCollection.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/collection/PersistentCollection.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PersistentCollection.java 5 Jan 2003 02:11:20 -0000 1.4 --- PersistentCollection.java 28 Jan 2003 10:22:19 -0000 1.5 *************** *** 2,7 **** package net.sf.hibernate.collection; ! import net.sf.hibernate.type.Type; ! import java.util.ArrayList; import java.util.Collection; --- 2,9 ---- package net.sf.hibernate.collection; ! import java.io.Serializable; ! import java.sql.PreparedStatement; ! import java.sql.ResultSet; ! import java.sql.SQLException; import java.util.ArrayList; import java.util.Collection; *************** *** 10,20 **** import java.util.ListIterator; ! import net.sf.hibernate.*; ! import java.sql.*; ! import java.io.*; import org.apache.commons.logging.LogFactory; - - import net.sf.hibernate.engine.SessionImplementor; /** --- 12,22 ---- import java.util.ListIterator; ! import net.sf.hibernate.AssertionFailure; ! import net.sf.hibernate.HibernateException; ! import net.sf.hibernate.LazyInitializationException; ! import net.sf.hibernate.engine.SessionImplementor; ! import net.sf.hibernate.type.Type; import org.apache.commons.logging.LogFactory; /** |
From: <one...@us...> - 2003-01-28 10:22:25
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate/loader Modified Files: Loader.java Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: Loader.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader/Loader.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Loader.java 26 Jan 2003 01:33:35 -0000 1.8 --- Loader.java 28 Jan 2003 10:22:20 -0000 1.9 *************** *** 262,266 **** else { // instantiate a new instance ! object = session.getFactory().getPersister(instanceClass).instantiate( key.getIdentifier() ); } --- 262,269 ---- else { // instantiate a new instance ! object = session.instantiate( ! session.getFactory().getPersister(instanceClass), ! key.getIdentifier() ! ); } |
From: <one...@us...> - 2003-01-28 10:22:24
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/engine In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate/engine Modified Files: SessionImplementor.java Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: SessionImplementor.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/engine/SessionImplementor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SessionImplementor.java 14 Jan 2003 13:42:10 -0000 1.5 --- SessionImplementor.java 28 Jan 2003 10:22:19 -0000 1.6 *************** *** 167,170 **** --- 167,172 ---- public Serializable getEntityIdentifier(Object obj); + public Object instantiate(ClassPersister persister, Serializable id) throws HibernateException; + } |
From: <one...@us...> - 2003-01-28 10:22:24
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate/impl Modified Files: SessionImpl.java Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: SessionImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/SessionImpl.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** SessionImpl.java 24 Jan 2003 16:15:55 -0000 1.13 --- SessionImpl.java 28 Jan 2003 10:22:19 -0000 1.14 *************** *** 617,621 **** } ! TypeFactory.deepCopy(values, types, persister.getPropertyMutability(), values); nullifyTransientReferences(values, types, identityCol, object); --- 617,621 ---- } ! TypeFactory.deepCopy(values, types, persister.getPropertyUpdateability(), values); nullifyTransientReferences(values, types, identityCol, object); *************** *** 817,821 **** else { entry.deletedState = new Object[entry.loadedState.length]; ! TypeFactory.deepCopy(entry.loadedState, propTypes, persister.getPropertyMutability(), entry.deletedState); } --- 817,821 ---- else { entry.deletedState = new Object[entry.loadedState.length]; ! TypeFactory.deepCopy(entry.loadedState, propTypes, persister.getPropertyUpdateability(), entry.deletedState); } *************** *** 1311,1314 **** --- 1311,1320 ---- } + public Object instantiate(ClassPersister persister, Serializable id) throws HibernateException { + Object result = interceptor.instantiate( persister.getMappedClass(), id ); + if (result==null) result = persister.instantiate(id); + return result; + } + public void setFlushMode(FlushMode flushMode) { this.flushMode = flushMode; *************** *** 1626,1630 **** if (entry!=null) { ClassPersister subclassPersister = getPersister( entry.getSubclass() ); ! Object result = (isOptionalObject) ? optionalObject : subclassPersister.instantiate(id); addEntry(result, LOADING, null, id, null, LockMode.NONE, true, subclassPersister); //make it circular-reference safe addEntity( new Key(id, persister), result ); --- 1632,1636 ---- if (entry!=null) { ClassPersister subclassPersister = getPersister( entry.getSubclass() ); ! Object result = (isOptionalObject) ? optionalObject : instantiate(subclassPersister, id); addEntry(result, LOADING, null, id, null, LockMode.NONE, true, subclassPersister); //make it circular-reference safe addEntity( new Key(id, persister), result ); *************** *** 1637,1641 **** } Type[] types = subclassPersister.getPropertyTypes(); ! TypeFactory.deepCopy(values, types, subclassPersister.getPropertyMutability(), values); Object version = Versioning.getVersion(values, subclassPersister); if ( log.isTraceEnabled() ) log.trace("Cached Version: " + version); --- 1643,1647 ---- } Type[] types = subclassPersister.getPropertyTypes(); ! TypeFactory.deepCopy(values, types, subclassPersister.getPropertyUpdateability(), values); Object version = Versioning.getVersion(values, subclassPersister); if ( log.isTraceEnabled() ) log.trace("Cached Version: " + version); *************** *** 1695,1699 **** for ( int i=0; i<hydratedState.length; i++ ) hydratedState[i] = types[i].resolveIdentifier( hydratedState[i], this ); persister.setPropertyValues(object, hydratedState); ! TypeFactory.deepCopy(hydratedState, persister.getPropertyTypes(), persister.getPropertyMutability(), hydratedState); //after setting values to object if ( persister.hasCache() ) --- 1701,1705 ---- for ( int i=0; i<hydratedState.length; i++ ) hydratedState[i] = types[i].resolveIdentifier( hydratedState[i], this ); persister.setPropertyValues(object, hydratedState); ! TypeFactory.deepCopy(hydratedState, persister.getPropertyTypes(), persister.getPropertyUpdateability(), hydratedState); //after setting values to object if ( persister.hasCache() ) *************** *** 1886,1902 **** boolean substitute = wrap(values, types); // substitutes into values by side-effect ! boolean noCleanState = entry.loadedState==null; // object loaded by update() ! final int[] dirtyProperties; ! if (!noCleanState) { ! dirtyProperties = persister.findDirty(values, entry.loadedState, object, this); } else { ! dirtyProperties = null; } ! // compare to cached state (ignoring nested collections) if ( ! noCleanState || ! (dirtyProperties!=null) || ( status==LOADED && persister.isVersioned() && --- 1892,1915 ---- boolean substitute = wrap(values, types); // substitutes into values by side-effect ! final boolean cannotDirtyCheck; ! ! int[] dirtyProperties = interceptor.findDirty(object, entry.id, values, entry.loadedState, persister.getPropertyNames(), types); ! ! if (dirtyProperties==null) { ! // Interceptor returned null, so do the dirtycheck ourself, if possible ! cannotDirtyCheck = entry.loadedState==null; // object loaded by update() ! if (!cannotDirtyCheck) { ! dirtyProperties = dirtyProperties = persister.findDirty(values, entry.loadedState, object, this); ! } } else { ! // the Interceptor handled the dirty checking ! cannotDirtyCheck = false; } ! // compare to cached state (ignoring nested collections) if ( ! cannotDirtyCheck || ! (dirtyProperties!=null && dirtyProperties.length!=0 ) || ( status==LOADED && persister.isVersioned() && *************** *** 1917,1921 **** Object[] copiedValues = new Object[values.length]; ! TypeFactory.deepCopy(values, types, persister.getPropertyMutability(), copiedValues); entry.loadedState = copiedValues; // for next time entry.nextLockMode = LockMode.WRITE; // if this flush goes ahead, we will have a write lock --- 1930,1934 ---- Object[] copiedValues = new Object[values.length]; ! TypeFactory.deepCopy(values, types, persister.getPropertyUpdateability(), copiedValues); entry.loadedState = copiedValues; // for next time entry.nextLockMode = LockMode.WRITE; // if this flush goes ahead, we will have a write lock |
From: <one...@us...> - 2003-01-28 10:22:24
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/mapping In directory sc8-pr-cvs1:/tmp/cvs-serv26035/sf/hibernate/mapping Modified Files: Property.java Log Message: renamed 'mutable' to 'update' added 'insert' attribute removed old dtds Index: Property.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/mapping/Property.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Property.java 27 Jan 2003 12:51:50 -0000 1.7 --- Property.java 28 Jan 2003 10:22:20 -0000 1.8 *************** *** 18,22 **** private Value value; private String cascade; ! private boolean mutable; public Type getType() { --- 18,27 ---- private Value value; private String cascade; ! private boolean updateable; ! private boolean insertable; ! ! public Property(Value value) { ! this.value=value; ! } public Type getType() { *************** *** 32,37 **** return name; } ! public boolean isMutable() { ! return mutable; } --- 37,42 ---- return name; } ! public boolean isUpdateable() { ! return updateable; } *************** *** 101,106 **** * @param mutable The mutable to set */ ! public void setMutable(boolean mutable) { ! this.mutable = mutable; } --- 106,111 ---- * @param mutable The mutable to set */ ! public void setUpdateable(boolean mutable) { ! this.updateable = mutable; } *************** *** 119,122 **** --- 124,143 ---- public void setValue(Value value) { this.value = value; + } + + /** + * Returns the insertable. + * @return boolean + */ + public boolean isInsertable() { + return insertable; + } + + /** + * Sets the insertable. + * @param insertable The insertable to set + */ + public void setInsertable(boolean insertable) { + this.insertable = insertable; } |
From: <one...@us...> - 2003-01-27 13:48:56
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv1130/cirrus/hibernate Modified Files: Environment.java Log Message: updated version no Index: Environment.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/Environment.java,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** Environment.java 4 Jan 2003 13:05:14 -0000 1.83 --- Environment.java 27 Jan 2003 13:48:53 -0000 1.84 *************** *** 39,43 **** public final class Environment { ! private static final String VERSION = "1.2.2"; /** --- 39,43 ---- public final class Environment { ! private static final String VERSION = "1.2.3"; /** |
From: <one...@us...> - 2003-01-27 13:20:26
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cache In directory sc8-pr-cvs1:/tmp/cvs-serv20143/src/net/sf/hibernate/cache Modified Files: CacheTest.java Log Message: made CacheTest work again Index: CacheTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cache/CacheTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CacheTest.java 5 Jan 2003 02:11:20 -0000 1.3 --- CacheTest.java 27 Jan 2003 13:20:16 -0000 1.4 *************** *** 17,25 **** public void doTestCache(Cache cache) throws Exception { ! long longBefore = System.currentTimeMillis(); Thread.sleep(15); ! long before = System.currentTimeMillis(); Thread.sleep(15); --- 17,25 ---- public void doTestCache(Cache cache) throws Exception { ! long longBefore = Timestamper.next(); Thread.sleep(15); ! long before = Timestamper.next(); Thread.sleep(15); *************** *** 35,39 **** Thread.sleep(15); ! long after = System.currentTimeMillis(); assertTrue( ccs.get("foo", longBefore)==null ); --- 35,39 ---- Thread.sleep(15); ! long after = Timestamper.next(); assertTrue( ccs.get("foo", longBefore)==null ); *************** *** 53,57 **** Thread.sleep(15); ! long whileLocked = System.currentTimeMillis(); assertTrue( !ccs.put("foo", "foo", whileLocked) ); --- 53,57 ---- Thread.sleep(15); ! long whileLocked = Timestamper.next(); assertTrue( !ccs.put("foo", "foo", whileLocked) ); *************** *** 69,73 **** Thread.sleep(15); ! long longAfter = System.currentTimeMillis(); assertTrue( ccs.put("foo", "baz", longAfter) ); --- 69,73 ---- Thread.sleep(15); ! long longAfter = Timestamper.next(); assertTrue( ccs.put("foo", "baz", longAfter) ); *************** *** 78,82 **** Thread.sleep(15); ! long longLongAfter = System.currentTimeMillis(); assertTrue( ccs.get("foo", longLongAfter).equals("baz") ); --- 78,82 ---- Thread.sleep(15); ! long longLongAfter = Timestamper.next(); assertTrue( ccs.get("foo", longLongAfter).equals("baz") ); *************** *** 91,95 **** Thread.sleep(15); ! whileLocked = System.currentTimeMillis(); assertTrue( !ccs.put("foo", "foo", whileLocked) ); --- 91,95 ---- Thread.sleep(15); ! whileLocked = Timestamper.next(); assertTrue( !ccs.put("foo", "foo", whileLocked) ); *************** *** 101,105 **** Thread.sleep(15); ! long betweenReleases = System.currentTimeMillis(); assertTrue( !ccs.put("foo", "bar", betweenReleases) ); --- 101,105 ---- Thread.sleep(15); ! long betweenReleases = Timestamper.next(); assertTrue( !ccs.put("foo", "bar", betweenReleases) ); *************** *** 114,118 **** Thread.sleep(15); ! longAfter = System.currentTimeMillis(); assertTrue( ccs.put("foo", "baz", longAfter) ); --- 114,118 ---- Thread.sleep(15); ! longAfter = Timestamper.next(); assertTrue( ccs.put("foo", "baz", longAfter) ); *************** *** 121,125 **** Thread.sleep(15); ! longLongAfter = System.currentTimeMillis(); assertTrue( ccs.get("foo", longLongAfter).equals("baz") ); --- 121,125 ---- Thread.sleep(15); ! longLongAfter = Timestamper.next(); assertTrue( ccs.get("foo", longLongAfter).equals("baz") ); |
From: <one...@us...> - 2003-01-27 13:03:54
|
Update of /cvsroot/hibernate/Hibernate2 In directory sc8-pr-cvs1:/tmp/cvs-serv12413 Modified Files: build.xml Log Message: add mapping package to javadoc Index: build.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/build.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** build.xml 26 Jan 2003 02:42:09 -0000 1.4 --- build.xml 27 Jan 2003 13:03:51 -0000 1.5 *************** *** 136,140 **** <javadoc sourcepath="${src.dir}" ! packagenames="net.sf.hibernate,net.sf.hibernate.id,net.sf.hibernate.connection,net.sf.hibernate.transaction,net.sf.hibernate.type,net.sf.hibernate.dialect,net.sf.hibernate.odmg,net.sf.hibernate.cfg,net.sf.hibernate.cache,net.sf.hibernate.jmx,net.sf.hibernate.loader,net.sf.hibernate.persister,net.sf.hibernate.engine,net.sf.hibernate.metadata" classpathref="lib.class.path" destdir="${dist.api.dir}" --- 136,140 ---- <javadoc sourcepath="${src.dir}" ! packagenames="net.sf.hibernate,net.sf.hibernate.id,net.sf.hibernate.connection,net.sf.hibernate.transaction,net.sf.hibernate.type,net.sf.hibernate.dialect,net.sf.hibernate.odmg,net.sf.hibernate.cfg,net.sf.hibernate.cache,net.sf.hibernate.jmx,net.sf.hibernate.loader,net.sf.hibernate.persister,net.sf.hibernate.engine,net.sf.hibernate.metadata,net.sf.hibernate.mapping" classpathref="lib.class.path" destdir="${dist.api.dir}" *************** *** 150,154 **** <group title="Core API" packages="net.sf.hibernate:net.sf.hibernate.metadata:net.sf.hibernate.cfg"/> <group title="Extension API" packages="net.sf.hibernate.id:net.sf.hibernate.connection:net.sf.hibernate.transaction:net.sf.hibernate.type:net.sf.hibernate.dialect:net.sf.hibernate.cache:net.sf.hibernate.loader:net.sf.hibernate.persister:net.sf.hibernate.engine"/> ! <group title="Extras" packages="net.sf.hibernate.odmg:net.sf.hibernate.jmx"/> </javadoc> --- 150,154 ---- <group title="Core API" packages="net.sf.hibernate:net.sf.hibernate.metadata:net.sf.hibernate.cfg"/> <group title="Extension API" packages="net.sf.hibernate.id:net.sf.hibernate.connection:net.sf.hibernate.transaction:net.sf.hibernate.type:net.sf.hibernate.dialect:net.sf.hibernate.cache:net.sf.hibernate.loader:net.sf.hibernate.persister:net.sf.hibernate.engine"/> ! <group title="Miscellaneous API" packages="net.sf.hibernate.odmg:net.sf.hibernate.jmx:net.sf.hibernate.mapping"/> </javadoc> |