Hibernate SVN: r19373 - in validator/trunk/hibernate-validator/src/main/docbook/en-US: modules and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: gunnar.morling
Date: 2010-05-05 18:12:39 -0400 (Wed, 05 May 2010)
New Revision: 19373
Added:
validator/trunk/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_eclipse.png
validator/trunk/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_netbeans.png
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
Log:
HV-298: initial version of the ref guide chapter on the AP. This is work in progress, the chapter is not yet referenced from the main doc.
Added: validator/trunk/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_eclipse.png
===================================================================
(Binary files differ)
Property changes on: validator/trunk/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_eclipse.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: validator/trunk/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_netbeans.png
===================================================================
(Binary files differ)
Property changes on: validator/trunk/hibernate-validator/src/main/docbook/en-US/images/annotation_processor_netbeans.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml 2010-05-05 22:12:39 UTC (rev 19373)
@@ -0,0 +1,496 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
+<!--
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+-->
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter>
+ <title id="chapter-annotation-processor">The Hibernate Validation Annotation
+ Processor (EXPERIMENTAL)
+ </title>
+
+ <para>Have you ever caught yourself by unintentionally doing things
+ like
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>annotating Strings with @Min to specify a minimum length (instead
+ of using @Size)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>annotating the setter of a JavaBean property (instead of the
+ getter method)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>annotating static fields/methods with constraint annotations
+ (which is not supported)?
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Then the Hibernate Validator Annotation Processor is the right thing
+ for you. It helps in preventing such mistakes by plugging in into the build
+ process and raising compilation errors whenever constraint annotations are
+ incorrectly used.
+ </para>
+
+ <section>
+ <title>Prerequisites</title>
+
+ <para>The Hibernate Validator Annotation Processor is based on the
+ "Pluggable Annotation Processing API" as defined by<ulink
+ url="http://jcp.org/en/jsr/detail?id=269">JSR 269</ulink>.This API is part
+ of the Java Platform since Java 6. So be sure to use this or a later
+ version.
+ </para>
+
+ <para>TODO GM: add note on experimental state of the AP</para>
+ </section>
+
+ <section id="section-features-of-the-ap">
+ <title>Features</title>
+
+ <para>As of Hibernate Validator 4.1 the Hibernate Validator Annotation
+ Processor checks:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>whether constraint annotations are allowed for the type of the
+ annotated element
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>that for JavaBean properties the getter method is
+ annotated
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>that only non-static fields or properties are annotated with
+ constraint annotations
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>that only non-primitive fields or properties are annotated with
+ @Valid
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>that only such annotation types are annotated with constraint
+ annotations which are constraint annotations themselves
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Options</title>
+
+ <para>The behavior of the Hibernate Validator Annotation Processor can be
+ controlled using the
+ <ulink
+ url="http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options">processor
+ options
+ </ulink>
+ listed in table<xref
+ linkend="table_processor_options"/>:
+ </para>
+
+ <table id="table_processor_options">
+ <title>Hibernate Validator Annotation Processor options</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry align="center">Option</entry>
+
+ <entry align="center">Explanation</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <varname>diagnosticKind</varname>
+ </entry>
+
+ <entry>Controls how constraint problems are reported. Must be the
+ string representation of one of the values from the enum
+ <classname>javax.tools.Diagnostic.Kind</classname>, e.g.
+ <classname>WARNING</classname>. A value of
+ <classname>ERROR</classname>
+ will cause compilation to halt
+ whenever the AP detects a constraint problem. Defaults to
+ ERROR.
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <varname>verbose</varname>
+ </entry>
+
+ <entry>TODO GM: NOT YET IMPLEMENTED. Controls whether detailed
+ processing information shall be displayed or not, useful for
+ debugging purposes. Must be either
+ <varname>true</varname>
+ or
+ <varname>false</varname>. Defaults to
+ <varname>false</varname>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Using the Annotation Processor</title>
+
+ <para>This section shows in detail how to integrate the Hibernate
+ Validator Annotation Processor into command line builds (javac, Ant,
+ Maven) as well as IDE-based builds (Eclipse, IntelliJ IDEA,
+ NetBeans).
+ </para>
+
+ <section>
+ <title>javac</title>
+
+ <para>When compiling on the command line using<ulink
+ url="http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html">javac</ulink>,
+ specify the following JARs using the "processorpath" option:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>validation-api-1.0.0.GA.jar</para>
+ </listitem>
+
+ <listitem>
+ <para>hibernate-validator-annotation-processor-4.1.0.GA.jar</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The following example shows the compilation of one class. The
+ processor will be detected automatically by the compiler and invoked
+ during compilation.
+ </para>
+
+ <example>
+ <title>Using the annotation processor with javac</title>
+
+ <programlisting>javac src/main/java/org/hibernate/validator/ap/demo/Car.java
+ -cp /path/to/validation-api-1.0.0.GA.jar
+ -processorpath
+ /path/to/validation-api-1.0.0.GA.jar:/path/to/hibernate-validator-annotation-processor-4.1.0.GA.jar
+ </programlisting>
+ </example>
+ </section>
+
+ <section>
+ <title>Apache Ant</title>
+
+ <para>Similar to directly working with javac, the annotation processor
+ can be added as as compiler argument when invoking the
+ <ulink
+ url="http://ant.apache.org/manual/CoreTasks/javac.html">javac
+ task
+ </ulink>
+ for<ulink url="http://ant.apache.org/">Apache
+ Ant</ulink>:
+ </para>
+
+ <example>
+ <title>Using the annotation processor with Ant</title>
+
+ <programlisting><javac
+ srcdir="src/main"
+ destdir="build/classes"
+ classpath="/path/to/validation-api-1.0.0.GA.jar">
+
+ <compilerarg value="-processorpath" />
+ <compilerarg
+ value="/path/to/validation-api-1.0.0.GA.jar:/path/to/hibernate-validator-annotation-processor-4.1.0-SNAPSHOT.jar"
+ />
+ </javac></programlisting>
+ </example>
+ </section>
+
+ <section>
+ <title>Maven</title>
+
+ <para>There are several options for integrating the annotation processor
+ with<ulink url="http://maven.apache.org/">Apache Maven</ulink>.
+ Generally it is sufficient to add the Hibernate Validator Annotation
+ Processor as dependency to your project:
+ </para>
+
+ <example>
+ <title>Adding the HV Annotation Processor as dependency</title>
+
+ <programlisting>...
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator-annotation-processor</artifactId>
+ <version>4.1.0.GA</version>
+ <scope>compile</scope>
+ </dependency>
+ ...
+ </programlisting>
+ </example>
+
+ <para>The processor will then be executed automatically by the compiler.
+ This basically works, but comes with the disadavantage that in some
+ cases messages from the annotation processor are not displayed (see
+ <ulink url="???">MCOMPILER-66</ulink>).
+ </para>
+
+ <para>Another option is using the<ulink
+ url="http://code.google.com/p/maven-annotation-plugin/">Maven Annotation
+ Plugin</ulink>. At the time of this writing the plugin is not yet
+ available in any of the well-known repositories. Therefore you have to
+ add the project's own repository to your settings.xml or pom.xml:
+ </para>
+
+ <para>
+ <example>
+ <title>Adding the Maven Annotation Plugin repository</title>
+
+ <programlisting>...
+ <pluginRepositories>
+ <pluginRepository>
+ <id>maven-annotation-plugin-repo</id>
+ <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo&...
+ </pluginRepository>
+ </pluginRepositories>
+ ...
+ </programlisting>
+ </example>
+ Now disable the standard annotation processing performed by
+ the compiler plugin and configure the annotation plugin by specifying an
+ execution and adding the Hibernate Validator annotation processor as
+ plugin dependency (that way the AP is not visible on the project's
+ actual classpath):
+ </para>
+
+ <example>
+ <title>Configuring the Maven Annotation Plugin</title>
+
+ <programlisting>...
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <compilerArgument>-proc:none</compilerArgument>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.bsc.maven</groupId>
+ <artifactId>maven-processor-plugin</artifactId>
+ <version>1.3.4</version>
+ <executions>
+ <execution>
+ <id>process</id>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator-annotation-processor</artifactId>
+ <version>4.1.0.GA</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+ </plugin>
+ ...
+ </programlisting>
+ </example>
+ </section>
+
+ <section>
+ <title>Eclipse</title>
+
+ <para>Do the following to integrate the annotation processor with the
+ Eclipse IDE:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Right-click your project, choose "Properties"</para>
+ </listitem>
+
+ <listitem>
+ <para>Go to "Java Compiler" and make sure, that "Compiler compliance
+ level" is set to "1.6", otherwise the processor won't be
+ activated
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Go to "Java Compiler - Annotation Processing" and choose
+ "Enable annotation processing"
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Go to "Java Compiler - Annotation Processing - Factory Path"
+ and add the following JARs:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>validation-api-1.0.0.GA.jar</para>
+ </listitem>
+
+ <listitem>
+ <para>hibernate-validator-annotation-processor-4.1.0.GA.jar</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>Confirm the workspace rebuild</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>You now should see any annotation problems as regular error
+ markers within the editor and in the "Problem" view:
+ </para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" arch="" contentwidth="150mm"
+ fileref="annotation_processor_eclipse.png"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section>
+ <title>IntelliJ IDEA</title>
+
+ <para>The following steps must be followed to use the annotation
+ processor within IntelliJ IDEA (version 9 and above):
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Go to "File", then "Settings",</para>
+ </listitem>
+
+ <listitem>
+ <para>Expand the node "Compiler", then "Annotation
+ Processors"
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Choose "Enable annotation processing" and enter the following
+ as "Processor path":
+ /path/to/validation-api-1.0.0.GA.jar:/path/to/hibernate-validator-annotation-processor-4.1.0.GA.jar
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Add the processor's fully qualified name
+ "org.hibernate.validator.ap.ConstraintValidationProcessor" to the
+ "Annotation Processors" list
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Add you module to the "Processed Modules" list</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Rebuilding your project then should show any erronous constraint
+ annotations:
+ </para>
+
+ <para>TODO GM: ANNOTATION_PROCESSOR_INTELLIJ.PNG</para>
+ </section>
+
+ <section>
+ <title>NetBeans</title>
+
+ <para>Starting with version 6.9, also the NetBeans IDE supports plugging
+ in annotation processors into the IDE build. To do so, do the
+ following:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Right-click your project, choose "Properties"</para>
+ </listitem>
+
+ <listitem>
+ <para>Go to "Libraries", tab "Processor", and add the following two
+ JARs:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>validation-api-1.0.0.GA.jar</para>
+ </listitem>
+
+ <listitem>
+ <para>hibernate-validator-annotation-processor-4.1.0.GA.jar</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>Go to "Build - Compiling", select "Enable Annotation
+ Processing" and "Enable Annotation Processing in Editor". Add the
+ annotation processor by specifying its fully qualified name
+ org.hibernate.validator.ap.ConstraintValidationProcessor
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Any constraint annotation problems will then be marked directly
+ within the editor:
+ </para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" arch="" contentwidth="150mm"
+ fileref="annotation_processor_eclipse.png"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+ </section>
+
+ <section>
+ <title>Known issues</title>
+
+ <para>TODO GM</para>
+ </section>
+</chapter>
Property changes on: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
___________________________________________________________________
Name: svn:keywords
+ Id
14 years, 7 months
Hibernate SVN: r19372 - core/trunk/documentation/manual/src/main/docbook/en-US/content.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2010-05-05 13:51:27 -0400 (Wed, 05 May 2010)
New Revision: 19372
Modified:
core/trunk/documentation/manual/src/main/docbook/en-US/content/basic_mapping.xml
Log:
HHH-5149 add @o.h.a.T description in @SecondaryTable
Modified: core/trunk/documentation/manual/src/main/docbook/en-US/content/basic_mapping.xml
===================================================================
--- core/trunk/documentation/manual/src/main/docbook/en-US/content/basic_mapping.xml 2010-05-05 10:06:47 UTC (rev 19371)
+++ core/trunk/documentation/manual/src/main/docbook/en-US/content/basic_mapping.xml 2010-05-05 17:51:27 UTC (rev 19372)
@@ -2721,7 +2721,7 @@
<title>Mapping one entity to several tables</title>
<para>While not recommended for a fresh schema, some legacy databases
- force your to map a single entity on several tables. </para>
+ force your to map a single entity on several tables.</para>
<para>Using the <literal>@SecondaryTable</literal> or
<literal>@SecondaryTables</literal> class level annotations. To
@@ -2774,6 +2774,79 @@
has). Plus a unique constraint on <literal>storyPart2</literal> has
been set.</para>
+ <para>There is also additional tuning accessible via the
+ <classname>@org.hibernate.annotations.Table</classname>
+ annotation:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><literal>fetch</literal>: If set to JOIN, the default,
+ Hibernate will use an inner join to retrieve a secondary table
+ defined by a class or its superclasses and an outer join for a
+ secondary table defined by a subclass. If set to
+ <classname>SELECT</classname> then Hibernate will use a sequential
+ select for a secondary table defined on a subclass, which will be
+ issued only if a row turns out to represent an instance of the
+ subclass. Inner joins will still be used to retrieve a secondary
+ defined by the class and its superclasses.</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>inverse</literal>: If true, Hibernate will not try
+ to insert or update the properties defined by this join. Default
+ to false.</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>optional</literal>: If enabled (the default),
+ Hibernate will insert a row only if the properties defined by this
+ join are non-null and will always use an outer join to retrieve
+ the properties.</para>
+ </listitem>
+
+ <listitem>
+ <para><literal>foreignKey</literal>: defines the Foreign Key name
+ of a secondary table pointing back to the primary table.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Make sure to use the secondary table name in the
+ <methodname>appliesto</methodname> property</para>
+
+ <programlisting language="JAVA" role="JAVA">@Entity
+@Table(name="MainCat")
+@SecondaryTable(name="Cat1")
+(a)org.hibernate.annotations.Table(
+ appliesTo="Cat1",
+ fetch=FetchMode.SELECT,
+ optional=true)
+public class Cat implements Serializable {
+
+ private Integer id;
+ private String name;
+ private String storyPart1;
+ private String storyPart2;
+
+ @Id @GeneratedValue
+ public Integer getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @Column(table="Cat1")
+ public String getStoryPart1() {
+ return storyPart1;
+ }
+
+ @Column(table="Cat2")
+ public String getStoryPart2() {
+ return storyPart2;
+ }
+}</programlisting>
+
<para>In hbm.xml, use the <literal><join></literal>
element.</para>
@@ -2878,32 +2951,74 @@
</section>
</section>
- <section id="mapping-declaration-version" revision="4">
- <title>Version (optional)</title>
+ <section>
+ <title>Optimistic locking properties (optional)</title>
- <para>The <literal><version></literal> element is optional and
- indicates that the table contains versioned data. This is particularly
- useful if you plan to use <emphasis>long transactions</emphasis>. See
- below for more information:</para>
+ <para>When using long transactions or conversations that span several
+ database transactions, it is useful to store versioning data to ensure
+ that if the same entity is updated by two conversations, the last to
+ commit changes will be informed and not override the other
+ conversation's work. It guarantees some isolation while still allowing
+ for good scalability and works particularly well in read-often
+ write-sometimes situations.</para>
- <programlistingco role="XML">
- <areaspec>
- <area coords="2" id="version1" />
+ <section id="entity-mapping-entity-version">
+ <title>Versioning for optimistic locking</title>
- <area coords="3" id="version2" />
+ <para>You can add optimistic locking capability to an entity using the
+ <literal>@Version</literal> annotation:</para>
- <area coords="4" id="version3" />
+ <programlisting language="JAVA" role="JAVA">@Entity
+public class Flight implements Serializable {
+...
+ @Version
+ @Column(name="OPTLOCK")
+ public Integer getVersion() { ... }
+} </programlisting>
- <area coords="5" id="version4" />
+ <para>The version property will be mapped to the
+ <literal>OPTLOCK</literal> column, and the entity manager will use it
+ to detect conflicting updates (preventing lost updates you might
+ otherwise see with the last-commit-wins strategy).</para>
- <area coords="6" id="version5" />
+ <para>The version column may be a numeric (the recommended solution)
+ or a timestamp. Hibernate supports any kind of type provided that you
+ define and implement the appropriate
+ <classname>UserVersionType</classname>.</para>
- <area coords="7" id="version6" />
+ <para>The application must not alter the version number set up by
+ Hibernate in any way. To artificially increase the version number,
+ check in Hibernate Entity Manager's reference documentation
+ <literal>LockModeType.OPTIMISTIC_FORCE_INCREMENT</literal> or
+ <literal>LockModeType.PESSIMISTIC_FORCE_INCREMENT</literal>.</para>
+ </section>
- <area coords="8" id="version7" />
- </areaspec>
+ <section id="mapping-declaration-version" revision="4">
+ <title>Version</title>
- <programlisting><version
+ <para>The <literal><version></literal> element is optional and
+ indicates that the table contains versioned data. This is particularly
+ useful if you plan to use <emphasis>long transactions</emphasis>. See
+ below for more information:</para>
+
+ <programlistingco role="XML">
+ <areaspec>
+ <area coords="2" id="version1" />
+
+ <area coords="3" id="version2" />
+
+ <area coords="4" id="version3" />
+
+ <area coords="5" id="version4" />
+
+ <area coords="6" id="version5" />
+
+ <area coords="7" id="version6" />
+
+ <area coords="8" id="version7" />
+ </areaspec>
+
+ <programlisting><version
column="version_column"
name="propertyName"
type="typename"
@@ -2914,97 +3029,98 @@
node="element-name|@attribute-name|element/@attribute|."
/></programlisting>
- <calloutlist>
- <callout arearefs="version1">
- <para><literal>column</literal> (optional - defaults to the
- property name): the name of the column holding the version
- number.</para>
- </callout>
+ <calloutlist>
+ <callout arearefs="version1">
+ <para><literal>column</literal> (optional - defaults to the
+ property name): the name of the column holding the version
+ number.</para>
+ </callout>
- <callout arearefs="version2">
- <para><literal>name</literal>: the name of a property of the
- persistent class.</para>
- </callout>
+ <callout arearefs="version2">
+ <para><literal>name</literal>: the name of a property of the
+ persistent class.</para>
+ </callout>
- <callout arearefs="version3">
- <para><literal>type</literal> (optional - defaults to
- <literal>integer</literal>): the type of the version
- number.</para>
- </callout>
+ <callout arearefs="version3">
+ <para><literal>type</literal> (optional - defaults to
+ <literal>integer</literal>): the type of the version
+ number.</para>
+ </callout>
- <callout arearefs="version4">
- <para><literal>access</literal> (optional - defaults to
- <literal>property</literal>): the strategy Hibernate uses to
- access the property value.</para>
- </callout>
+ <callout arearefs="version4">
+ <para><literal>access</literal> (optional - defaults to
+ <literal>property</literal>): the strategy Hibernate uses to
+ access the property value.</para>
+ </callout>
- <callout arearefs="version5">
- <para><literal>unsaved-value</literal> (optional - defaults to
- <literal>undefined</literal>): a version property value that
- indicates that an instance is newly instantiated (unsaved),
- distinguishing it from detached instances that were saved or
- loaded in a previous session. <literal>Undefined</literal>
- specifies that the identifier property value should be
- used.</para>
- </callout>
+ <callout arearefs="version5">
+ <para><literal>unsaved-value</literal> (optional - defaults to
+ <literal>undefined</literal>): a version property value that
+ indicates that an instance is newly instantiated (unsaved),
+ distinguishing it from detached instances that were saved or
+ loaded in a previous session. <literal>Undefined</literal>
+ specifies that the identifier property value should be
+ used.</para>
+ </callout>
- <callout arearefs="version6">
- <para><literal>generated</literal> (optional - defaults to
- <literal>never</literal>): specifies that this version property
- value is generated by the database. See the discussion of <link
- linkend="mapping-generated">generated properties</link> for more
- information.</para>
- </callout>
+ <callout arearefs="version6">
+ <para><literal>generated</literal> (optional - defaults to
+ <literal>never</literal>): specifies that this version property
+ value is generated by the database. See the discussion of <link
+ linkend="mapping-generated">generated properties</link> for more
+ information.</para>
+ </callout>
- <callout arearefs="version7">
- <para><literal>insert</literal> (optional - defaults to
- <literal>true</literal>): specifies whether the version column
- should be included in SQL insert statements. It can be set to
- <literal>false</literal> if the database column is defined with a
- default value of <literal>0</literal>.</para>
- </callout>
- </calloutlist>
- </programlistingco>
+ <callout arearefs="version7">
+ <para><literal>insert</literal> (optional - defaults to
+ <literal>true</literal>): specifies whether the version column
+ should be included in SQL insert statements. It can be set to
+ <literal>false</literal> if the database column is defined with
+ a default value of <literal>0</literal>.</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
- <para>Version numbers can be of Hibernate type <literal>long</literal>,
- <literal>integer</literal>, <literal>short</literal>,
- <literal>timestamp</literal> or <literal>calendar</literal>.</para>
+ <para>Version numbers can be of Hibernate type
+ <literal>long</literal>, <literal>integer</literal>,
+ <literal>short</literal>, <literal>timestamp</literal> or
+ <literal>calendar</literal>.</para>
- <para>A version or timestamp property should never be null for a
- detached instance. Hibernate will detect any instance with a null
- version or timestamp as transient, irrespective of what other
- <literal>unsaved-value</literal> strategies are specified.
- <emphasis>Declaring a nullable version or timestamp property is an easy
- way to avoid problems with transitive reattachment in Hibernate. It is
- especially useful for people using assigned identifiers or composite
- keys</emphasis>.</para>
- </section>
+ <para>A version or timestamp property should never be null for a
+ detached instance. Hibernate will detect any instance with a null
+ version or timestamp as transient, irrespective of what other
+ <literal>unsaved-value</literal> strategies are specified.
+ <emphasis>Declaring a nullable version or timestamp property is an
+ easy way to avoid problems with transitive reattachment in Hibernate.
+ It is especially useful for people using assigned identifiers or
+ composite keys</emphasis>.</para>
+ </section>
- <section id="mapping-declaration-timestamp" revision="4">
- <title>Timestamp (optional)</title>
+ <section id="mapping-declaration-timestamp" revision="4">
+ <title>Timestamp (optional)</title>
- <para>The optional <literal><timestamp></literal> element
- indicates that the table contains timestamped data. This provides an
- alternative to versioning. Timestamps are a less safe implementation of
- optimistic locking. However, sometimes the application might use the
- timestamps in other ways.</para>
+ <para>The optional <literal><timestamp></literal> element
+ indicates that the table contains timestamped data. This provides an
+ alternative to versioning. Timestamps are a less safe implementation
+ of optimistic locking. However, sometimes the application might use
+ the timestamps in other ways.</para>
- <programlistingco role="XML">
- <areaspec>
- <area coords="2" id="timestamp1" />
+ <programlistingco role="XML">
+ <areaspec>
+ <area coords="2" id="timestamp1" />
- <area coords="3" id="timestamp2" />
+ <area coords="3" id="timestamp2" />
- <area coords="4" id="timestamp3" />
+ <area coords="4" id="timestamp3" />
- <area coords="5" id="timestamp4" />
+ <area coords="5" id="timestamp4" />
- <area coords="6" id="timestamp5" />
+ <area coords="6" id="timestamp5" />
- <area coords="7" id="timestamp6" />
- </areaspec>
+ <area coords="7" id="timestamp6" />
+ </areaspec>
- <programlisting><timestamp
+ <programlisting><timestamp
column="timestamp_column"
name="propertyName"
access="field|property|ClassName"
@@ -3014,64 +3130,67 @@
node="element-name|@attribute-name|element/@attribute|."
/></programlisting>
- <calloutlist>
- <callout arearefs="timestamp1">
- <para><literal>column</literal> (optional - defaults to the
- property name): the name of a column holding the timestamp.</para>
- </callout>
+ <calloutlist>
+ <callout arearefs="timestamp1">
+ <para><literal>column</literal> (optional - defaults to the
+ property name): the name of a column holding the
+ timestamp.</para>
+ </callout>
- <callout arearefs="timestamp2">
- <para><literal>name</literal>: the name of a JavaBeans style
- property of Java type <literal>Date</literal> or
- <literal>Timestamp</literal> of the persistent class.</para>
- </callout>
+ <callout arearefs="timestamp2">
+ <para><literal>name</literal>: the name of a JavaBeans style
+ property of Java type <literal>Date</literal> or
+ <literal>Timestamp</literal> of the persistent class.</para>
+ </callout>
- <callout arearefs="timestamp3">
- <para><literal>access</literal> (optional - defaults to
- <literal>property</literal>): the strategy Hibernate uses for
- accessing the property value.</para>
- </callout>
+ <callout arearefs="timestamp3">
+ <para><literal>access</literal> (optional - defaults to
+ <literal>property</literal>): the strategy Hibernate uses for
+ accessing the property value.</para>
+ </callout>
- <callout arearefs="timestamp4">
- <para><literal>unsaved-value</literal> (optional - defaults to
- <literal>null</literal>): a version property value that indicates
- that an instance is newly instantiated (unsaved), distinguishing
- it from detached instances that were saved or loaded in a previous
- session. <literal>Undefined</literal> specifies that the
- identifier property value should be used.</para>
- </callout>
+ <callout arearefs="timestamp4">
+ <para><literal>unsaved-value</literal> (optional - defaults to
+ <literal>null</literal>): a version property value that
+ indicates that an instance is newly instantiated (unsaved),
+ distinguishing it from detached instances that were saved or
+ loaded in a previous session. <literal>Undefined</literal>
+ specifies that the identifier property value should be
+ used.</para>
+ </callout>
- <callout arearefs="timestamp5">
- <para><literal>source</literal> (optional - defaults to
- <literal>vm</literal>): Where should Hibernate retrieve the
- timestamp value from? From the database, or from the current JVM?
- Database-based timestamps incur an overhead because Hibernate must
- hit the database in order to determine the "next value". It is
- safer to use in clustered environments. Not all
- <literal>Dialects</literal> are known to support the retrieval of
- the database's current timestamp. Others may also be unsafe for
- usage in locking due to lack of precision (Oracle 8, for
- example).</para>
- </callout>
+ <callout arearefs="timestamp5">
+ <para><literal>source</literal> (optional - defaults to
+ <literal>vm</literal>): Where should Hibernate retrieve the
+ timestamp value from? From the database, or from the current
+ JVM? Database-based timestamps incur an overhead because
+ Hibernate must hit the database in order to determine the "next
+ value". It is safer to use in clustered environments. Not all
+ <literal>Dialects</literal> are known to support the retrieval
+ of the database's current timestamp. Others may also be unsafe
+ for usage in locking due to lack of precision (Oracle 8, for
+ example).</para>
+ </callout>
- <callout arearefs="timestamp6">
- <para><literal>generated</literal> (optional - defaults to
- <literal>never</literal>): specifies that this timestamp property
- value is actually generated by the database. See the discussion of
- <link linkend="mapping-generated">generated properties</link> for
- more information.</para>
- </callout>
- </calloutlist>
- </programlistingco>
+ <callout arearefs="timestamp6">
+ <para><literal>generated</literal> (optional - defaults to
+ <literal>never</literal>): specifies that this timestamp
+ property value is actually generated by the database. See the
+ discussion of <link linkend="mapping-generated">generated
+ properties</link> for more information.</para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
- <note>
- <title>Note</title>
+ <note>
+ <title>Note</title>
- <para><literal><Timestamp></literal> is equivalent to
- <literal><version type="timestamp"></literal>. And
- <literal><timestamp source="db"></literal> is equivalent to
- <literal><version type="dbtimestamp"></literal></para>
- </note>
+ <para><literal><Timestamp></literal> is equivalent to
+ <literal><version type="timestamp"></literal>. And
+ <literal><timestamp source="db"></literal> is equivalent to
+ <literal><version type="dbtimestamp"></literal></para>
+ </note>
+ </section>
</section>
<section id="mapping-declaration-property" revision="4">
14 years, 8 months
Hibernate SVN: r19371 - in core/trunk/envers/src: test/java/org/hibernate/envers/test/integration/manytomany and 9 other directories.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2010-05-05 06:06:47 -0400 (Wed, 05 May 2010)
New Revision: 19371
Added:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSubclass.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSubclass2.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSuperclass.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/ManyToManyInverseToSuperclassTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/Master.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSubclass.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSubclass2.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSuperclass.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/Master.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/OneToManyInverseToSuperclassTest.java
core/trunk/envers/src/test/resources/mappings/manyToMany/
core/trunk/envers/src/test/resources/mappings/manyToMany/inverseToSuperclass/
core/trunk/envers/src/test/resources/mappings/manyToMany/inverseToSuperclass/mappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/oneToMany/
core/trunk/envers/src/test/resources/mappings/oneToMany/inverseToSuperclass/
core/trunk/envers/src/test/resources/mappings/oneToMany/inverseToSuperclass/mappings.hbm.xml
Modified:
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/CollectionMetadataGenerator.java
core/trunk/envers/src/test/resources/testng.xml
Log:
HHH-5191: Applying patch by Hernan Chanfreau
CollectionMetadataGenerator failed to obtain mappedBy attribute when is defined on superclasses
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/CollectionMetadataGenerator.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/CollectionMetadataGenerator.java 2010-05-05 09:02:30 UTC (rev 19370)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/CollectionMetadataGenerator.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -80,6 +80,7 @@
/**
* Generates metadata for a collection-valued property.
* @author Adam Warski (adam at warski dot org)
+ * @author Hern�n Chanfreau
*/
public final class CollectionMetadataGenerator {
private static final Logger log = LoggerFactory.getLogger(CollectionMetadataGenerator.class);
@@ -533,7 +534,6 @@
return middleEntityXmlId;
}
- @SuppressWarnings({"unchecked"})
private String getMappedBy(Collection collectionValue) {
PersistentClass referencedClass = ((OneToMany) collectionValue.getElement()).getAssociatedClass();
@@ -543,8 +543,31 @@
return auditMappedBy;
}
+ // searching in referenced class
+ String mappedBy = this.searchMappedBy(referencedClass, collectionValue);
+
+ if(mappedBy == null) {
+ log.debug("Going to search the mapped by attribute for " + propertyName + " in superclasses of entity: " + referencedClass.getClassName());
+
+ PersistentClass tempClass = referencedClass;
+ while ((mappedBy == null) && (tempClass.getSuperclass() != null)) {
+ log.debug("Searching in superclass: " + tempClass.getSuperclass().getClassName());
+ mappedBy = this.searchMappedBy(tempClass.getSuperclass(), collectionValue);
+ tempClass = tempClass.getSuperclass();
+ }
+ }
+
+ if(mappedBy == null) {
+ throw new MappingException("Unable to read the mapped by attribute for " + propertyName + " in "
+ + referencedClass.getClassName() + "!");
+ }
+
+ return mappedBy;
+ }
+
+ @SuppressWarnings({"unchecked"})
+ private String searchMappedBy(PersistentClass referencedClass, Collection collectionValue) {
Iterator<Property> assocClassProps = referencedClass.getPropertyIterator();
-
while (assocClassProps.hasNext()) {
Property property = assocClassProps.next();
@@ -552,13 +575,10 @@
collectionValue.getKey().getColumnIterator())) {
return property.getName();
}
- }
-
- throw new MappingException("Unable to read the mapped by attribute for " + propertyName + " in "
- + referencingEntityName + "!");
+ }
+ return null;
}
- @SuppressWarnings({"unchecked"})
private String getMappedBy(Table collectionTable, PersistentClass referencedClass) {
// If there's an @AuditMappedBy specified, returning it directly.
String auditMappedBy = propertyAuditingData.getAuditMappedBy();
@@ -566,6 +586,31 @@
return auditMappedBy;
}
+ // searching in referenced class
+ String mappedBy = this.searchMappedBy(referencedClass, collectionTable);
+
+ // not found on referenced class, searching on superclasses
+ if(mappedBy == null) {
+ log.debug("Going to search the mapped by attribute for " + propertyName + " in superclases of entity: " + referencedClass.getClassName());
+
+ PersistentClass tempClass = referencedClass;
+ while ((mappedBy == null) && (tempClass.getSuperclass() != null)) {
+ log.debug("Searching in superclass: " + tempClass.getSuperclass().getClassName());
+ mappedBy = this.searchMappedBy(tempClass.getSuperclass(), collectionTable);
+ tempClass = tempClass.getSuperclass();
+ }
+ }
+
+ if(mappedBy == null) {
+ throw new MappingException("Unable to read the mapped by attribute for " + propertyName + " in "
+ + referencedClass.getClassName() + "!");
+ }
+
+ return mappedBy;
+ }
+
+ @SuppressWarnings({"unchecked"})
+ private String searchMappedBy(PersistentClass referencedClass, Table collectionTable) {
Iterator<Property> properties = referencedClass.getPropertyIterator();
while (properties.hasNext()) {
Property property = properties.next();
@@ -576,9 +621,8 @@
return property.getName();
}
}
- }
-
- throw new MappingException("Unable to read the mapped by attribute for " + propertyName + " in "
- + referencingEntityName + "!");
+ }
+ return null;
}
+
}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSubclass.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSubclass.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSubclass.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,26 @@
+package org.hibernate.envers.test.integration.manytomany.inverseToSuperclass;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+import org.hibernate.envers.Audited;
+
+@Audited
+public class DetailSubclass extends DetailSuperclass {
+
+ private String str2;
+
+ public DetailSubclass() {
+
+ }
+
+ public String getStr2() {
+ return str2;
+ }
+
+ public void setStr2(String str2) {
+ this.str2 = str2;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSubclass2.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSubclass2.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSubclass2.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,26 @@
+package org.hibernate.envers.test.integration.manytomany.inverseToSuperclass;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+import org.hibernate.envers.Audited;
+
+@Audited
+public class DetailSubclass2 extends DetailSubclass {
+
+ private String str3;
+
+ public DetailSubclass2() {
+
+ }
+
+ public String getStr3() {
+ return str3;
+ }
+
+ public void setStr3(String str3) {
+ this.str3 = str3;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSuperclass.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSuperclass.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/DetailSuperclass.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,38 @@
+package org.hibernate.envers.test.integration.manytomany.inverseToSuperclass;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+import java.util.List;
+
+import org.hibernate.envers.Audited;
+
+@Audited
+public class DetailSuperclass {
+
+ private long id;
+
+ private List<Master> masters;
+
+ public DetailSuperclass() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public List<Master> getMasters() {
+ return masters;
+ }
+
+ public void setMasters(List<Master> masters) {
+ this.masters = masters;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/ManyToManyInverseToSuperclassTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/ManyToManyInverseToSuperclassTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/ManyToManyInverseToSuperclassTest.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,114 @@
+package org.hibernate.envers.test.integration.manytomany.inverseToSuperclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class ManyToManyInverseToSuperclassTest extends AbstractEntityTest {
+
+ private long m1_id;
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader()
+ .getResource(
+ "mappings/manyToMany/inverseToSuperclass/mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ Master m1 = new Master();
+ DetailSubclass det1 = new DetailSubclass2();
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ det1.setStr2("detail 1");
+
+ m1.setStr("master");
+ m1.setItems(new ArrayList<DetailSubclass>());
+ m1.getItems().add(det1);
+
+ det1.setMasters(new ArrayList<Master>());
+ det1.getMasters().add(m1);
+
+ em.persist(m1);
+ em.getTransaction().commit();
+ m1_id = m1.getId();
+
+ // Revision 2
+// em.getTransaction().begin();
+//
+// m1 = em.find(Master.class, m1_id);
+//
+// det2.setStr2("detail 2");
+// det2.setParent(m1);
+// m1.getItems().add(det2);
+// em.getTransaction().commit();
+//
+// // Revision 3
+// em.getTransaction().begin();
+//
+// m1 = em.find(Master.class, m1_id);
+// m1.setStr("new master");
+//
+// det1 = m1.getItems().get(0);
+// det1.setStr2("new detail");
+// DetailSubclass det3 = new DetailSubclass2();
+// det3.setStr2("detail 3");
+// det3.setParent(m1);
+//
+// m1.getItems().get(1).setParent(null);
+// // m1.getItems().remove(1);
+// m1.getItems().add(det3);
+//
+// em.persist(m1);
+// em.getTransaction().commit();
+//
+// // Revision 4
+// em.getTransaction().begin();
+//
+// m1 = em.find(Master.class, m1_id);
+//
+// det1 = m1.getItems().get(0);
+// det1.setParent(null);
+// // m1.getItems().remove(det1);
+//
+// em.persist(m1);
+// em.getTransaction().commit();
+
+ }
+
+ @Test
+ public void testHistoryExists() {
+ Master rev1_1 = getAuditReader().find(Master.class, m1_id, 1);
+ Master rev1_2 = getAuditReader().find(Master.class, m1_id, 2);
+ Master rev1_3 = getAuditReader().find(Master.class, m1_id, 3);
+ Master rev1_4 = getAuditReader().find(Master.class, m1_id, 4);
+
+ assert (rev1_1 != null);
+ assert (rev1_2 != null);
+ assert (rev1_3 != null);
+ assert (rev1_4 != null);
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/Master.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/Master.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/manytomany/inverseToSuperclass/Master.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,48 @@
+package org.hibernate.envers.test.integration.manytomany.inverseToSuperclass;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+import java.util.List;
+
+import org.hibernate.envers.Audited;
+
+@Audited
+public class Master {
+
+ private long id;
+
+ private String str;
+
+ private List<DetailSubclass> items;
+
+ public Master() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getStr() {
+ return str;
+ }
+
+ public void setStr(String str) {
+ this.str = str;
+ }
+
+ public List<DetailSubclass> getItems() {
+ return items;
+ }
+
+ public void setItems(List<DetailSubclass> items) {
+ this.items = items;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSubclass.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSubclass.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSubclass.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,26 @@
+package org.hibernate.envers.test.integration.onetomany.inverseToSuperclass;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+import org.hibernate.envers.Audited;
+
+@Audited
+public class DetailSubclass extends DetailSuperclass {
+
+ private String str2;
+
+ public DetailSubclass() {
+
+ }
+
+ public String getStr2() {
+ return str2;
+ }
+
+ public void setStr2(String str2) {
+ this.str2 = str2;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSubclass2.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSubclass2.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSubclass2.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,26 @@
+package org.hibernate.envers.test.integration.onetomany.inverseToSuperclass;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+import org.hibernate.envers.Audited;
+
+@Audited
+public class DetailSubclass2 extends DetailSubclass {
+
+ private String str3;
+
+ public DetailSubclass2() {
+
+ }
+
+ public String getStr3() {
+ return str3;
+ }
+
+ public void setStr3(String str3) {
+ this.str3 = str3;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSuperclass.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSuperclass.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/DetailSuperclass.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,36 @@
+package org.hibernate.envers.test.integration.onetomany.inverseToSuperclass;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+import org.hibernate.envers.Audited;
+
+@Audited
+public class DetailSuperclass {
+
+ private long id;
+
+ private Master parent;
+
+ public DetailSuperclass() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public Master getParent() {
+ return parent;
+ }
+
+ public void setParent(Master parent) {
+ this.parent = parent;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/Master.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/Master.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/Master.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,48 @@
+package org.hibernate.envers.test.integration.onetomany.inverseToSuperclass;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+import java.util.List;
+
+import org.hibernate.envers.Audited;
+
+@Audited
+public class Master {
+
+ private long id;
+
+ private String str;
+
+ private List<DetailSubclass> items;
+
+ public Master() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getStr() {
+ return str;
+ }
+
+ public void setStr(String str) {
+ this.str = str;
+ }
+
+ public List<DetailSubclass> getItems() {
+ return items;
+ }
+
+ public void setItems(List<DetailSubclass> items) {
+ this.items = items;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/OneToManyInverseToSuperclassTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/OneToManyInverseToSuperclassTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/onetomany/inverseToSuperclass/OneToManyInverseToSuperclassTest.java 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,113 @@
+package org.hibernate.envers.test.integration.onetomany.inverseToSuperclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class OneToManyInverseToSuperclassTest extends AbstractEntityTest {
+
+ private long m1_id;
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader()
+ .getResource(
+ "mappings/oneToMany/inverseToSuperclass/mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ Master m1 = new Master();
+ DetailSubclass det1 = new DetailSubclass2();
+ DetailSubclass det2 = new DetailSubclass2();
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ det1.setStr2("detail 1");
+
+ m1.setStr("master");
+ m1.setItems(new ArrayList<DetailSubclass>());
+ m1.getItems().add(det1);
+ det1.setParent(m1);
+
+ em.persist(m1);
+ em.getTransaction().commit();
+ m1_id = m1.getId();
+
+ // Revision 2
+ em.getTransaction().begin();
+
+ m1 = em.find(Master.class, m1_id);
+
+ det2.setStr2("detail 2");
+ det2.setParent(m1);
+ m1.getItems().add(det2);
+ em.getTransaction().commit();
+
+ // Revision 3
+ em.getTransaction().begin();
+
+ m1 = em.find(Master.class, m1_id);
+ m1.setStr("new master");
+
+ det1 = m1.getItems().get(0);
+ det1.setStr2("new detail");
+ DetailSubclass det3 = new DetailSubclass2();
+ det3.setStr2("detail 3");
+ det3.setParent(m1);
+
+ m1.getItems().get(1).setParent(null);
+ // m1.getItems().remove(1);
+ m1.getItems().add(det3);
+
+ em.persist(m1);
+ em.getTransaction().commit();
+
+ // Revision 4
+ em.getTransaction().begin();
+
+ m1 = em.find(Master.class, m1_id);
+
+ det1 = m1.getItems().get(0);
+ det1.setParent(null);
+ // m1.getItems().remove(det1);
+
+ em.persist(m1);
+ em.getTransaction().commit();
+
+ }
+
+ @Test
+ public void testHistoryExists() {
+ Master rev1_1 = getAuditReader().find(Master.class, m1_id, 1);
+ Master rev1_2 = getAuditReader().find(Master.class, m1_id, 2);
+ Master rev1_3 = getAuditReader().find(Master.class, m1_id, 3);
+ Master rev1_4 = getAuditReader().find(Master.class, m1_id, 4);
+
+ assert (rev1_1 != null);
+ assert (rev1_2 != null);
+ assert (rev1_3 != null);
+ assert (rev1_4 != null);
+ }
+
+}
Added: core/trunk/envers/src/test/resources/mappings/manyToMany/inverseToSuperclass/mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/manyToMany/inverseToSuperclass/mappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/manyToMany/inverseToSuperclass/mappings.hbm.xml 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.Master"
+ table="HIB_MASTER_ENTITY">
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="str" column="STR" />
+
+ <bag name="items" lazy="true" cascade="all" access="property" inverse="true"
+ table="HIB_MASTER_DETAIL">
+ <key column="ID_MASTER" />
+ <many-to-many
+ class="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSubclass2"
+ column="ID_DETAIL" />
+ </bag>
+ </class>
+
+
+ <class
+ name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSuperclass"
+ table="HIB_DETAIL_ENTITY" abstract="true">
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+ <discriminator column="DISCRIMINATOR" type="string" />
+
+ <bag name="masters" lazy="true" access="property" table="HIB_MASTER_DETAIL">
+ <key column="ID_DETAIL" />
+ <many-to-many
+ class="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.Master"
+ column="ID_MASTER" />
+ </bag>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSubclass"
+ discriminator-value="SUB">
+ <property name="str2" column="STR2" />
+
+ <subclass
+ name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSubclass2"
+ discriminator-value="SUB2"
+ extends="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass.DetailSubclass">
+ <property name="str3" column="STR3" />
+
+ </subclass>
+
+ </subclass>
+ </class>
+
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/resources/mappings/oneToMany/inverseToSuperclass/mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/oneToMany/inverseToSuperclass/mappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/oneToMany/inverseToSuperclass/mappings.hbm.xml 2010-05-05 10:06:47 UTC (rev 19371)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.onetomany.inverseToSuperclass.Master"
+ table="HIB_MASTER_ENTITY">
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="str" column="STR" />
+
+ <bag name="items" lazy="true" cascade="all" access="property"
+ inverse="true">
+ <key column="ID_MASTER" />
+ <one-to-many
+ class="org.hibernate.envers.test.integration.onetomany.inverseToSuperclass.DetailSubclass2" />
+ </bag>
+ </class>
+
+
+ <class
+ name="org.hibernate.envers.test.integration.onetomany.inverseToSuperclass.DetailSuperclass"
+ table="HIB_DETAIL_ENTITY" abstract="true">
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+ <discriminator column="DISCRIMINATOR" type="string" />
+
+ <many-to-one name="parent" column="ID_MASTER"
+ class="org.hibernate.envers.test.integration.onetomany.inverseToSuperclass.Master" />
+
+ <subclass
+ name="org.hibernate.envers.test.integration.onetomany.inverseToSuperclass.DetailSubclass"
+ discriminator-value="SUB">
+ <property name="str2" column="STR2" />
+
+ <subclass
+ name="org.hibernate.envers.test.integration.onetomany.inverseToSuperclass.DetailSubclass2"
+ discriminator-value="SUB2" extends="org.hibernate.envers.test.integration.onetomany.inverseToSuperclass.DetailSubclass">
+ <property name="str3" column="STR3" />
+
+ </subclass>
+
+ </subclass>
+ </class>
+
+
+</hibernate-mapping>
Modified: core/trunk/envers/src/test/resources/testng.xml
===================================================================
--- core/trunk/envers/src/test/resources/testng.xml 2010-05-05 09:02:30 UTC (rev 19370)
+++ core/trunk/envers/src/test/resources/testng.xml 2010-05-05 10:06:47 UTC (rev 19371)
@@ -43,6 +43,7 @@
<package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union" />
<package name="org.hibernate.envers.test.integration.manytomany" />
<package name="org.hibernate.envers.test.integration.manytomany.biowned" />
+ <package name="org.hibernate.envers.test.integration.manytomany.inverseToSuperclass" />
<package name="org.hibernate.envers.test.integration.manytomany.sametable" />
<package name="org.hibernate.envers.test.integration.manytomany.ternary" />
<package name="org.hibernate.envers.test.integration.manytomany.unidirectional" />
@@ -53,6 +54,7 @@
<package name="org.hibernate.envers.test.integration.notinsertable.manytoone" />
<package name="org.hibernate.envers.test.integration.onetomany" />
<package name="org.hibernate.envers.test.integration.onetomany.detached" />
+ <package name="org.hibernate.envers.test.integration.onetomany.inverseToSuperclass" />
<package name="org.hibernate.envers.test.integration.onetoone.bidirectional" />
<package name="org.hibernate.envers.test.integration.onetoone.bidirectional.ids" />
<package name="org.hibernate.envers.test.integration.onetoone.unidirectional" />
14 years, 8 months
Hibernate SVN: r19370 - in search/trunk: hibernate-search and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-05 05:02:30 -0400 (Wed, 05 May 2010)
New Revision: 19370
Modified:
search/trunk/hibernate-search-archetype/pom.xml
search/trunk/hibernate-search-testing/pom.xml
search/trunk/hibernate-search/pom.xml
search/trunk/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: search/trunk/hibernate-search/pom.xml
===================================================================
--- search/trunk/hibernate-search/pom.xml 2010-05-05 09:02:17 UTC (rev 19369)
+++ search/trunk/hibernate-search/pom.xml 2010-05-05 09:02:30 UTC (rev 19370)
@@ -28,7 +28,7 @@
<parent>
<artifactId>hibernate-search-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>3.2.0.Final</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: search/trunk/hibernate-search-archetype/pom.xml
===================================================================
--- search/trunk/hibernate-search-archetype/pom.xml 2010-05-05 09:02:17 UTC (rev 19369)
+++ search/trunk/hibernate-search-archetype/pom.xml 2010-05-05 09:02:30 UTC (rev 19370)
@@ -10,7 +10,7 @@
<parent>
<artifactId>hibernate-search-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>3.2.0.Final</version>
+ <version>3.3.0-SNAPSHOT</version>
</parent>
<groupId>com.example</groupId>
Modified: search/trunk/hibernate-search-testing/pom.xml
===================================================================
--- search/trunk/hibernate-search-testing/pom.xml 2010-05-05 09:02:17 UTC (rev 19369)
+++ search/trunk/hibernate-search-testing/pom.xml 2010-05-05 09:02:30 UTC (rev 19370)
@@ -28,7 +28,7 @@
<parent>
<artifactId>hibernate-search-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>3.2.0.Final</version>
+ <version>3.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml 2010-05-05 09:02:17 UTC (rev 19369)
+++ search/trunk/pom.xml 2010-05-05 09:02:30 UTC (rev 19370)
@@ -27,7 +27,7 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-parent</artifactId>
- <version>3.2.0.Final</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Hibernate Search Aggregator</name>
@@ -48,9 +48,9 @@
</issueManagement>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/hibernate/search/tags/v3_2_0_Final</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/search/tags/v3_2_0_Final</developerConnection>
- <url>http://fisheye.jboss.com/browse/Hibernate/search/tags/v3_2_0_Final</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/hibernate/search/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/search/trunk</developerConnection>
+ <url>http://fisheye.jboss.com/browse/Hibernate/search/trunk</url>
</scm>
<organization>
14 years, 8 months
Hibernate SVN: r19369 - search/tags.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-05 05:02:17 -0400 (Wed, 05 May 2010)
New Revision: 19369
Added:
search/tags/v3_2_0_Final/
Log:
[maven-scm] copy for tag v3_2_0_Final
Copied: search/tags/v3_2_0_Final (from rev 19368, search/trunk)
14 years, 8 months
Hibernate SVN: r19368 - in search/trunk: hibernate-search and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-05 05:01:55 -0400 (Wed, 05 May 2010)
New Revision: 19368
Modified:
search/trunk/hibernate-search-archetype/pom.xml
search/trunk/hibernate-search-testing/pom.xml
search/trunk/hibernate-search/pom.xml
search/trunk/pom.xml
Log:
[maven-release-plugin] prepare release v3_2_0_Final
Modified: search/trunk/hibernate-search/pom.xml
===================================================================
--- search/trunk/hibernate-search/pom.xml 2010-05-05 08:57:48 UTC (rev 19367)
+++ search/trunk/hibernate-search/pom.xml 2010-05-05 09:01:55 UTC (rev 19368)
@@ -28,7 +28,7 @@
<parent>
<artifactId>hibernate-search-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: search/trunk/hibernate-search-archetype/pom.xml
===================================================================
--- search/trunk/hibernate-search-archetype/pom.xml 2010-05-05 08:57:48 UTC (rev 19367)
+++ search/trunk/hibernate-search-archetype/pom.xml 2010-05-05 09:01:55 UTC (rev 19368)
@@ -1,7 +1,5 @@
<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
@@ -12,7 +10,7 @@
<parent>
<artifactId>hibernate-search-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0.Final</version>
</parent>
<groupId>com.example</groupId>
Modified: search/trunk/hibernate-search-testing/pom.xml
===================================================================
--- search/trunk/hibernate-search-testing/pom.xml 2010-05-05 08:57:48 UTC (rev 19367)
+++ search/trunk/hibernate-search-testing/pom.xml 2010-05-05 09:01:55 UTC (rev 19368)
@@ -28,7 +28,7 @@
<parent>
<artifactId>hibernate-search-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml 2010-05-05 08:57:48 UTC (rev 19367)
+++ search/trunk/pom.xml 2010-05-05 09:01:55 UTC (rev 19368)
@@ -22,14 +22,12 @@
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-parent</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0.Final</version>
<packaging>pom</packaging>
<name>Hibernate Search Aggregator</name>
@@ -50,9 +48,9 @@
</issueManagement>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/hibernate/search/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/search/trunk</developerConnection>
- <url>http://fisheye.jboss.com/browse/Hibernate/search/trunk</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/hibernate/search/tags/v3_2_0_Final</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/search/tags/v3_2_0_Final</developerConnection>
+ <url>http://fisheye.jboss.com/browse/Hibernate/search/tags/v3_2_0_Final</url>
</scm>
<organization>
@@ -447,8 +445,8 @@
<jdbc.driver>org.hsqldb.jdbcDriver</jdbc.driver>
<jdbc.url>jdbc:hsqldb:.</jdbc.url>
<jdbc.user>sa</jdbc.user>
- <jdbc.pass/>
- <jdbc.isolation/>
+ <jdbc.pass />
+ <jdbc.isolation />
</properties>
</profile>
<!--
@@ -475,7 +473,7 @@
<jdbc.url>jdbc:mysql://vmg08.mw.lab.eng.bos.redhat.com/searctru</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -495,7 +493,7 @@
<jdbc.url>jdbc:mysql://vmg02.mw.lab.eng.bos.redhat.com/searctru</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -516,7 +514,7 @@
</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -537,7 +535,7 @@
<jdbc.url>jdbc:postgresql://vmg01.mw.lab.eng.bos.redhat.com:5432:searctru</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -558,7 +556,7 @@
<jdbc.url>jdbc:postgresql://vmg03.mw.lab.eng.bos.redhat.com:5432:searctru</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -578,7 +576,7 @@
<jdbc.url>jdbc:postgresql://notinstalled.lab.eng.bos.redhat.com:5432:searctru</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -609,7 +607,7 @@
<jdbc.url>jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -634,7 +632,7 @@
<jdbc.url>jdbc:db2://dev67.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -659,7 +657,7 @@
<jdbc.url>jdbc:db2://vmg06.mw.lab.eng.bos.redhat.com:50000/jbossqa</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -680,7 +678,7 @@
<jdbc.url>jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -701,7 +699,7 @@
<jdbc.url>jdbc:oracle:thin:@vmg05.mw.lab.eng.bos.redhat.com:1521:qaora10</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -721,7 +719,7 @@
<jdbc.url>jdbc:oracle:thin:@dev04.qa.atl2.redhat.com:1521:qaora11</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -743,7 +741,7 @@
</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
@@ -763,7 +761,7 @@
<jdbc.url>jdbc:sybase:Tds:vmg07.mw.lab.eng.bos.redhat.com:5000/searctru</jdbc.url>
<jdbc.user>searctru</jdbc.user>
<jdbc.pass>searctru</jdbc.pass>
- <jdbc.isolation/>
+ <jdbc.isolation />
</properties>
</profile>
14 years, 8 months
Hibernate SVN: r19367 - search/trunk/hibernate-search-archetype.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-05 04:57:48 -0400 (Wed, 05 May 2010)
New Revision: 19367
Modified:
search/trunk/hibernate-search-archetype/pom.xml
Log:
parent.version was rejected by the release plugin
Modified: search/trunk/hibernate-search-archetype/pom.xml
===================================================================
--- search/trunk/hibernate-search-archetype/pom.xml 2010-05-05 08:49:43 UTC (rev 19366)
+++ search/trunk/hibernate-search-archetype/pom.xml 2010-05-05 08:57:48 UTC (rev 19367)
@@ -25,7 +25,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
- <version>${parent.version}</version>
+ <version>${version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
14 years, 8 months
Hibernate SVN: r19366 - search/trunk/hibernate-search-testing.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-05 04:49:43 -0400 (Wed, 05 May 2010)
New Revision: 19366
Modified:
search/trunk/hibernate-search-testing/pom.xml
Log:
pom.version and pom.groupId were rejected by the release plugin
Modified: search/trunk/hibernate-search-testing/pom.xml
===================================================================
--- search/trunk/hibernate-search-testing/pom.xml 2010-05-05 08:47:18 UTC (rev 19365)
+++ search/trunk/hibernate-search-testing/pom.xml 2010-05-05 08:49:43 UTC (rev 19366)
@@ -28,10 +28,10 @@
<parent>
<artifactId>hibernate-search-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>3.2.0.Final</version>
+ <version>3.2.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
-
+
<artifactId>hibernate-search-testing</artifactId>
<name>Hibernate Search Testing</name>
14 years, 8 months
Hibernate SVN: r19365 - search/trunk/hibernate-search-testing.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-05 04:47:18 -0400 (Wed, 05 May 2010)
New Revision: 19365
Modified:
search/trunk/hibernate-search-testing/pom.xml
Log:
pom.version and pom.groupId were rejected by the release plugin
Modified: search/trunk/hibernate-search-testing/pom.xml
===================================================================
--- search/trunk/hibernate-search-testing/pom.xml 2010-05-05 08:43:26 UTC (rev 19364)
+++ search/trunk/hibernate-search-testing/pom.xml 2010-05-05 08:47:18 UTC (rev 19365)
@@ -28,7 +28,7 @@
<parent>
<artifactId>hibernate-search-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -39,9 +39,9 @@
<dependencies>
<dependency>
- <groupId>${parent.groupId}</groupId>
+ <groupId>${groupId}</groupId>
<artifactId>hibernate-search</artifactId>
- <version>${parent.version}</version>
+ <version>${version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
14 years, 8 months