[jboss-cvs] JBossAS SVN: r96026 - in projects/docs/enterprise: 4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 4 20:41:36 EST 2009


Author: laubai
Date: 2009-11-04 20:41:36 -0500 (Wed, 04 Nov 2009)
New Revision: 96026

Modified:
   projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Entity_Beans.xml
   projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Overriding_metadata_through_XML.xml
   projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_55.java
   projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_83.java
   projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Entity_Beans.xml
   projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Overriding_metadata_through_XML.xml
   projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_55.java
   projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_83.java
Log:
Edited 4.2.8 and 4.3.7 Hibernate Annotations Ref Guide for JBPAPP-1715.

Modified: projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Entity_Beans.xml
===================================================================
--- projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Entity_Beans.xml	2009-11-05 00:57:34 UTC (rev 96025)
+++ projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Entity_Beans.xml	2009-11-05 01:41:36 UTC (rev 96026)
@@ -494,7 +494,7 @@
 					A <classname>Customer</classname> is linked to a <classname>Passport</classname>, with a foreign key column named <literal>passport_fk</literal> in the <literal>Customer</literal> table. The join column is declared with the <literal>@JoinColumn</literal> annotation which looks like the <literal>@Column</literal> annotation. It has one more parameters named <literal>referencedColumnName</literal>. This parameter declares the column in the targeted entity that will be used to the join. Note that when using <literal><literal>referencedColumnName</literal></literal> to a non primary key column, the associated class has to be <classname>Serializable</classname>. Also note that the <literal><literal>referencedColumnName</literal></literal> to a non primary key column has to be mapped to a property having a single column (other cases might not work).
 				</para>
 				<para>
-					The association may be bidirectional. In a bidirectional relationship, one of the sides (and only one) has to be the owner: the owner is responsible for the association column(s) update. To declare a side as <emphasis>not</emphasis> responsible for the relationship, the attribute <literal>mappedBy</literal> is used. <literal>mappedBy</literal> refers to the property name of the association on the owner side. In our case, this is <literal>passport</literal>. As you can see, you don't have to (must not) declare the join column since it has already been declared on the owners side.
+					The association may be bidirectional. In a bidirectional relationship, one of the sides (and only one) has to be the owner: the owner is responsible for the association column(s) update. To declare a side as <emphasis>not</emphasis> responsible for the relationship, the attribute <literal>mappedBy</literal> is used. <literal>mappedBy</literal> refers to the property name of the association on the owner side. In our case, this is <literal>passport</literal>. As you can see, you must not declare the join column since it has already been declared on the owners side.
 				</para>
 				<para>
 					If no <literal>@JoinColumn</literal> is declared on the owner side, the defaults apply. A join column(s) will be created in the owner table and its name will be the concatenation of the name of the relationship in the owner side, <keycap>_</keycap> (underscore), and the name of the primary key column(s) in the owned side. In this example <literal>passport_id</literal> because the property name is <literal>passport</literal> and the column id of <literal>Passport </literal>is <literal>id</literal>.
@@ -528,7 +528,7 @@
 				
 		<programlisting language="java"><xi:include href="extras/Code_Example_31.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
 				<para>
-					You can also map a many-to-one association through an association table. This association table described by the <literal>@JoinTable</literal> annotation will contains a foreign key referencing back the entity table (through <literal>@JoinTable.joinColumns</literal>) and a a foreign key referencing the target entity table (through <literal>@JoinTable.inverseJoinColumns</literal>).
+					You can also map a many-to-one association through an association table. This association table described by the <literal>@JoinTable</literal> annotation will contains a foreign key referencing back the entity table (through <literal>@JoinTable.joinColumns</literal>) and a foreign key referencing the target entity table (through <literal>@JoinTable.inverseJoinColumns</literal>).
 				</para>
 				
 		<programlisting language="java"><xi:include href="extras/Code_Example_32.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
@@ -649,7 +649,7 @@
 						
 		<programlisting language="java"><xi:include href="extras/Code_Example_34.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
 						<para>
-							<classname>Troop</classname> has a bidirectional one-to-many relationship with <literal>Soldier</literal> through the <literal>troop</literal> property. You don't have to (must not) define any physical mapping in the <literal>mappedBy</literal> side.
+							<classname>Troop</classname> has a bidirectional one-to-many relationship with <literal>Soldier</literal> through the <literal>troop</literal> property. You must not define any physical mapping in the <literal>mappedBy</literal> side.
 						</para>
 						<para>
 							To map a bidirectional one-to-many, with the one-to-many side as the owning side, you have to remove the <literal>mappedBy</literal> element and set the many-to-one <literal>@JoinColumn</literal> as insertable and updatable to false. This solution is obviously not optimized and will produce some additional UPDATE statements.
@@ -711,7 +711,7 @@
 							We've already shown the many declarations and the detailed attributes for associations. We'll go deeper in the <literal>@JoinTable</literal> description, it defines a <literal>name</literal>, an array of join columns (an array in annotation is defined using { A, B, C }), and an array of inverse join columns. The latter ones are the columns of the association table which refer to the <classname>Employee</classname> primary key (the "other side").
 						</para>
 						<para>
-							As seen previously, the other side don't have to (must not) describe the physical mapping: a simple <literal>mappedBy</literal> argument containing the owner side property name bind the two.
+							As seen previously, the other side must not describe the physical mapping: a simple <literal>mappedBy</literal> argument containing the owner side property name bind the two.
 						</para>
 					</section>
 					

Modified: projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Overriding_metadata_through_XML.xml
===================================================================
--- projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Overriding_metadata_through_XML.xml	2009-11-05 00:57:34 UTC (rev 96025)
+++ projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Overriding_metadata_through_XML.xml	2009-11-05 01:41:36 UTC (rev 96026)
@@ -150,7 +150,7 @@
 		<section id="sect-Hibernate_Annotations_Reference_Guide-Principles-Property_level_metadata">
 			<title>Property level metadata</title>
 			<para>
-				You can of course define XML overriding for properties. If metadata complete is defined, then additional properties (ie at the Java level) will be ignored. Otherwise, once you start overriding a property, all annotations on the given property are ignored. All property level metadata behave in <literal>entity/attributes</literal>, <literal>mapped-superclass/attributes</literal> or <literal>embeddable/attributes</literal>.
+				You can of course define XML overriding for properties. If metadata complete is defined, then additional properties (ie at the Java level) will be ignored. Otherwise, once you start overriding a property, all annotations on the given property are ignored. All property level metadata resides in <literal>entity/attributes</literal>, <literal>mapped-superclass/attributes</literal> or <literal>embeddable/attributes</literal>.
 			</para>
 			
 		<programlisting language="xml"><xi:include href="extras/Code_Example_98.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>

Modified: projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_55.java
===================================================================
--- projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_55.java	2009-11-05 00:57:34 UTC (rev 96025)
+++ projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_55.java	2009-11-05 01:41:36 UTC (rev 96026)
@@ -6,6 +6,6 @@
         optimisticLock = OptimisticLockType.ALL,
         polymorphism = PolymorphismType.EXPLICIT)
 @Where(clause="1=1")
- at org.hibernate.annotations.Table(name="Forest", indexes = { @Index(name="idx", columnNames = { "name", "length" } ) } )
+ at org.hibernate.annotations.Table(appliesTo="Forest", indexes = { @Index(name="idx", columnNames = { "name", "length" } ) } )
 @Persister(impl=MyEntityPersister.class)
 public class Forest { ... }
\ No newline at end of file

Modified: projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_83.java
===================================================================
--- projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_83.java	2009-11-05 00:57:34 UTC (rev 96025)
+++ projects/docs/enterprise/4.2.8/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_83.java	2009-11-05 01:41:36 UTC (rev 96026)
@@ -15,7 +15,7 @@
         return nickNames;
     }
 
-    @CollectionOfElements @JoinTable( table=@Table(name="BoyFavoriteNumbers"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoriteNumber", nullable=false)
+    @CollectionOfElements @JoinTable( name="BoyFavoriteNumbers", joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoriteNumber", nullable=false)
     @IndexColumn(name="nbr_index")
     public int[] getFavoriteNumbers() {
         return favoriteNumbers;

Modified: projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Entity_Beans.xml
===================================================================
--- projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Entity_Beans.xml	2009-11-05 00:57:34 UTC (rev 96025)
+++ projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Entity_Beans.xml	2009-11-05 01:41:36 UTC (rev 96026)
@@ -494,7 +494,7 @@
 					A <classname>Customer</classname> is linked to a <classname>Passport</classname>, with a foreign key column named <literal>passport_fk</literal> in the <literal>Customer</literal> table. The join column is declared with the <literal>@JoinColumn</literal> annotation which looks like the <literal>@Column</literal> annotation. It has one more parameters named <literal>referencedColumnName</literal>. This parameter declares the column in the targeted entity that will be used to the join. Note that when using <literal><literal>referencedColumnName</literal></literal> to a non primary key column, the associated class has to be <classname>Serializable</classname>. Also note that the <literal><literal>referencedColumnName</literal></literal> to a non primary key column has to be mapped to a property having a single column (other cases might not work).
 				</para>
 				<para>
-					The association may be bidirectional. In a bidirectional relationship, one of the sides (and only one) has to be the owner: the owner is responsible for the association column(s) update. To declare a side as <emphasis>not</emphasis> responsible for the relationship, the attribute <literal>mappedBy</literal> is used. <literal>mappedBy</literal> refers to the property name of the association on the owner side. In our case, this is <literal>passport</literal>. As you can see, you don't have to (must not) declare the join column since it has already been declared on the owners side.
+					The association may be bidirectional. In a bidirectional relationship, one of the sides (and only one) has to be the owner: the owner is responsible for the association column(s) update. To declare a side as <emphasis>not</emphasis> responsible for the relationship, the attribute <literal>mappedBy</literal> is used. <literal>mappedBy</literal> refers to the property name of the association on the owner side. In our case, this is <literal>passport</literal>. As you can see, you must not declare the join column since it has already been declared on the owners side.
 				</para>
 				<para>
 					If no <literal>@JoinColumn</literal> is declared on the owner side, the defaults apply. A join column(s) will be created in the owner table and its name will be the concatenation of the name of the relationship in the owner side, <keycap>_</keycap> (underscore), and the name of the primary key column(s) in the owned side. In this example <literal>passport_id</literal> because the property name is <literal>passport</literal> and the column id of <literal>Passport </literal>is <literal>id</literal>.
@@ -528,7 +528,7 @@
 				
 		<programlisting language="java"><xi:include href="extras/Code_Example_31.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
 				<para>
-					You can also map a many-to-one association through an association table. This association table described by the <literal>@JoinTable</literal> annotation will contains a foreign key referencing back the entity table (through <literal>@JoinTable.joinColumns</literal>) and a a foreign key referencing the target entity table (through <literal>@JoinTable.inverseJoinColumns</literal>).
+					You can also map a many-to-one association through an association table. This association table described by the <literal>@JoinTable</literal> annotation will contains a foreign key referencing back the entity table (through <literal>@JoinTable.joinColumns</literal>) and a foreign key referencing the target entity table (through <literal>@JoinTable.inverseJoinColumns</literal>).
 				</para>
 				
 		<programlisting language="java"><xi:include href="extras/Code_Example_32.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
@@ -649,7 +649,7 @@
 						
 		<programlisting language="java"><xi:include href="extras/Code_Example_34.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>
 						<para>
-							<classname>Troop</classname> has a bidirectional one-to-many relationship with <literal>Soldier</literal> through the <literal>troop</literal> property. You don't have to (must not) define any physical mapping in the <literal>mappedBy</literal> side.
+							<classname>Troop</classname> has a bidirectional one-to-many relationship with <literal>Soldier</literal> through the <literal>troop</literal> property. You must not define any physical mapping in the <literal>mappedBy</literal> side.
 						</para>
 						<para>
 							To map a bidirectional one-to-many, with the one-to-many side as the owning side, you have to remove the <literal>mappedBy</literal> element and set the many-to-one <literal>@JoinColumn</literal> as insertable and updatable to false. This solution is obviously not optimized and will produce some additional UPDATE statements.
@@ -711,7 +711,7 @@
 							We've already shown the many declarations and the detailed attributes for associations. We'll go deeper in the <literal>@JoinTable</literal> description, it defines a <literal>name</literal>, an array of join columns (an array in annotation is defined using { A, B, C }), and an array of inverse join columns. The latter ones are the columns of the association table which refer to the <classname>Employee</classname> primary key (the "other side").
 						</para>
 						<para>
-							As seen previously, the other side don't have to (must not) describe the physical mapping: a simple <literal>mappedBy</literal> argument containing the owner side property name bind the two.
+							As seen previously, the other side must not describe the physical mapping: a simple <literal>mappedBy</literal> argument containing the owner side property name bind the two.
 						</para>
 					</section>
 					

Modified: projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Overriding_metadata_through_XML.xml
===================================================================
--- projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Overriding_metadata_through_XML.xml	2009-11-05 00:57:34 UTC (rev 96025)
+++ projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/Overriding_metadata_through_XML.xml	2009-11-05 01:41:36 UTC (rev 96026)
@@ -150,7 +150,7 @@
 		<section id="sect-Hibernate_Annotations_Reference_Guide-Principles-Property_level_metadata">
 			<title>Property level metadata</title>
 			<para>
-				You can of course define XML overriding for properties. If metadata complete is defined, then additional properties (ie at the Java level) will be ignored. Otherwise, once you start overriding a property, all annotations on the given property are ignored. All property level metadata behave in <literal>entity/attributes</literal>, <literal>mapped-superclass/attributes</literal> or <literal>embeddable/attributes</literal>.
+				You can of course define XML overriding for properties. If metadata complete is defined, then additional properties (ie at the Java level) will be ignored. Otherwise, once you start overriding a property, all annotations on the given property are ignored. All property level metadata resides in <literal>entity/attributes</literal>, <literal>mapped-superclass/attributes</literal> or <literal>embeddable/attributes</literal>.
 			</para>
 			
 		<programlisting language="xml"><xi:include href="extras/Code_Example_98.xmlt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></programlisting>

Modified: projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_55.java
===================================================================
--- projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_55.java	2009-11-05 00:57:34 UTC (rev 96025)
+++ projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_55.java	2009-11-05 01:41:36 UTC (rev 96026)
@@ -6,6 +6,6 @@
         optimisticLock = OptimisticLockType.ALL,
         polymorphism = PolymorphismType.EXPLICIT)
 @Where(clause="1=1")
- at org.hibernate.annotations.Table(name="Forest", indexes = { @Index(name="idx", columnNames = { "name", "length" } ) } )
+ at org.hibernate.annotations.Table(appliesTo="Forest", indexes = { @Index(name="idx", columnNames = { "name", "length" } ) } )
 @Persister(impl=MyEntityPersister.class)
 public class Forest { ... }
\ No newline at end of file

Modified: projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_83.java
===================================================================
--- projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_83.java	2009-11-05 00:57:34 UTC (rev 96025)
+++ projects/docs/enterprise/4.3.7/Hibernate/Hibernate_Annotations_Reference_Guide/en-US/extras/Code_Example_83.java	2009-11-05 01:41:36 UTC (rev 96026)
@@ -15,7 +15,7 @@
         return nickNames;
     }
 
-    @CollectionOfElements @JoinTable( table=@Table(name="BoyFavoriteNumbers"), joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoriteNumber", nullable=false)
+    @CollectionOfElements @JoinTable( name="BoyFavoriteNumbers", joinColumns = @JoinColumn(name="BoyId") ) @Column(name="favoriteNumber", nullable=false)
     @IndexColumn(name="nbr_index")
     public int[] getFavoriteNumbers() {
         return favoriteNumbers;




More information about the jboss-cvs-commits mailing list