Hibernate SVN: r15186 - core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-12 00:36:50 -0400 (Fri, 12 Sep 2008)
New Revision: 15186
Added:
core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache/SingletonEhCacheProvider.java
Modified:
core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache/EhCache.java
Log:
HHH-3450 : SingletonEhCacheProvider
Modified: core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache/EhCache.java
===================================================================
--- core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache/EhCache.java 2008-09-10 18:19:01 UTC (rev 15185)
+++ core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache/EhCache.java 2008-09-12 04:36:50 UTC (rev 15186)
@@ -49,7 +49,7 @@
private static final int SIXTY_THOUSAND_MS = 60000;
- private net.sf.ehcache.Cache cache;
+ private net.sf.ehcache.Ehcache cache;
/**
* Creates a new Hibernate pluggable cache based on a cache name.
@@ -57,7 +57,7 @@
*
* @param cache The underlying EhCache instance to use.
*/
- public EhCache(net.sf.ehcache.Cache cache) {
+ public EhCache(net.sf.ehcache.Ehcache cache) {
this.cache = cache;
}
@@ -278,4 +278,4 @@
return "EHCache(" + getRegionName() + ')';
}
-}
\ No newline at end of file
+}
Added: core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache/SingletonEhCacheProvider.java
===================================================================
--- core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache/SingletonEhCacheProvider.java (rev 0)
+++ core/branches/Branch_3_3/cache-ehcache/src/main/java/org/hibernate/cache/SingletonEhCacheProvider.java 2008-09-12 04:36:50 UTC (rev 15186)
@@ -0,0 +1,202 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.cache;
+
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.util.ClassLoaderUtil;
+
+import java.net.URL;
+import java.util.Properties;
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+/**
+ * Singleton cache Provider plugin for Hibernate 3.2 and ehcache-1.2. New in this provider is support for
+ * non Serializable keys and values. This provider works as a Singleton. No matter how many Hibernate Configurations
+ * you have, only one ehcache CacheManager is used. See EhCacheProvider for a non-singleton implementation.
+ * <p/>
+ * Ehcache-1.2 also has many other features such as cluster support and listeners, which can be used seamlessly simply
+ * by configurion in ehcache.xml.
+ * <p/>
+ * Use <code>hibernate.cache.provider_class=net.sf.ehcache.hibernate.SingletonEhCacheProvider</code> in the Hibernate configuration
+ * to enable this provider for Hibernate's second level cache.
+ * <p/>
+ * Updated for ehcache-1.2. Note this provider requires ehcache-1.2.jar. Make sure ehcache-1.1.jar or earlier
+ * is not in the classpath or it will not work.
+ * <p/>
+ * See http://ehcache.sf.net for documentation on ehcache
+ * <p/>
+ *
+ * @author Greg Luck
+ * @author Emmanuel Bernard
+ * @version $Id: SingletonEhCacheProvider.java 744 2008-08-16 20:10:49Z gregluck $
+ */
+public final class SingletonEhCacheProvider implements CacheProvider {
+
+ /**
+ * The Hibernate system property specifying the location of the ehcache configuration file name.
+ * <p/
+ * If not set, ehcache.xml will be looked for in the root of the classpath.
+ * <p/>
+ * If set to say ehcache-1.xml, ehcache-1.xml will be looked for in the root of the classpath.
+ */
+ public static final String NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME = "net.sf.ehcache.configurationResourceName";
+
+ private static final Logger LOG = Logger.getLogger( SingletonEhCacheProvider.class.getName() );
+
+ /**
+ * To be backwardly compatible with a lot of Hibernate code out there, allow multiple starts and stops on the
+ * one singleton CacheManager. Keep a count of references to only stop on when only one reference is held.
+ */
+ private static int referenceCount;
+
+ private CacheManager manager;
+
+
+ /**
+ * Builds a Cache.
+ * <p/>
+ * Even though this method provides properties, they are not used.
+ * Properties for EHCache are specified in the ehcache.xml file.
+ * Configuration will be read from ehcache.xml for a cache declaration
+ * where the name attribute matches the name parameter in this builder.
+ *
+ * @param name the name of the cache. Must match a cache configured in ehcache.xml
+ * @param properties not used
+ *
+ * @return a newly built cache will be built and initialised
+ *
+ * @throws org.hibernate.cache.CacheException
+ * inter alia, if a cache of the same name already exists
+ */
+ public final Cache buildCache(String name, Properties properties) throws CacheException {
+ try {
+ net.sf.ehcache.Ehcache cache = manager.getEhcache( name );
+ if ( cache == null ) {
+ SingletonEhCacheProvider.LOG.warning(
+ "Could not find a specific ehcache configuration for cache named ["
+ + name + "]; using defaults."
+ );
+ manager.addCache( name );
+ cache = manager.getEhcache( name );
+ SingletonEhCacheProvider.LOG.fine( "started EHCache region: " + name );
+ }
+ return new EhCache( cache );
+ }
+ catch ( net.sf.ehcache.CacheException e ) {
+ throw new CacheException( e );
+ }
+ }
+
+ /**
+ * Returns the next timestamp.
+ */
+ public final long nextTimestamp() {
+ return Timestamper.next();
+ }
+
+ /**
+ * Callback to perform any necessary initialization of the underlying cache implementation
+ * during SessionFactory construction.
+ * <p/>
+ *
+ * @param properties current configuration settings.
+ */
+ public final void start(Properties properties) throws CacheException {
+ String configurationResourceName = null;
+ if ( properties != null ) {
+ configurationResourceName = ( String ) properties.get( NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME );
+ }
+ if ( configurationResourceName == null || configurationResourceName.length() == 0 ) {
+ manager = CacheManager.create();
+ referenceCount++;
+ }
+ else {
+ if ( !configurationResourceName.startsWith( "/" ) ) {
+ configurationResourceName = "/" + configurationResourceName;
+ if ( LOG.isLoggable( Level.FINE ) ) {
+ LOG.fine(
+ "prepending / to " + configurationResourceName + ". It should be placed in the root"
+ + "of the classpath rather than in a package."
+ );
+ }
+ }
+ URL url = loadResource( configurationResourceName );
+ manager = CacheManager.create( url );
+ referenceCount++;
+ }
+ }
+
+ private URL loadResource(String configurationResourceName) {
+ ClassLoader standardClassloader = ClassLoaderUtil.getStandardClassLoader();
+ URL url = null;
+ if ( standardClassloader != null ) {
+ url = standardClassloader.getResource( configurationResourceName );
+ }
+ if ( url == null ) {
+ url = this.getClass().getResource( configurationResourceName );
+ }
+ if ( LOG.isLoggable( Level.FINE ) ) {
+ LOG.fine(
+ "Creating EhCacheProvider from a specified resource: "
+ + configurationResourceName + " Resolved to URL: " + url
+ );
+ }
+ if ( url == null ) {
+ if ( LOG.isLoggable( Level.WARNING ) ) {
+ LOG.warning(
+ "A configurationResourceName was set to " + configurationResourceName +
+ " but the resource could not be loaded from the classpath." +
+ "Ehcache will configure itself using defaults."
+ );
+ }
+ }
+ return url;
+ }
+
+ /**
+ * Callback to perform any necessary cleanup of the underlying cache implementation
+ * during SessionFactory.close().
+ */
+ public void stop() {
+ if ( manager != null ) {
+ referenceCount--;
+ if ( referenceCount == 0 ) {
+ manager.shutdown();
+ }
+ manager = null;
+ }
+ }
+
+ /**
+ * Not sure what this is supposed to do.
+ *
+ * @return false to be safe
+ */
+ public final boolean isMinimalPutsEnabledByDefault() {
+ return false;
+ }
+
+}
16 years, 3 months
Hibernate SVN: r15185 - in core/branches/Branch_3_3: cache-ehcache and 18 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 14:19:01 -0400 (Wed, 10 Sep 2008)
New Revision: 15185
Modified:
core/branches/Branch_3_3/cache-ehcache/pom.xml
core/branches/Branch_3_3/cache-jbosscache/pom.xml
core/branches/Branch_3_3/cache-jbosscache2/pom.xml
core/branches/Branch_3_3/cache-oscache/pom.xml
core/branches/Branch_3_3/cache-swarmcache/pom.xml
core/branches/Branch_3_3/connection-c3p0/pom.xml
core/branches/Branch_3_3/connection-proxool/pom.xml
core/branches/Branch_3_3/core/pom.xml
core/branches/Branch_3_3/distribution/pom.xml
core/branches/Branch_3_3/documentation/manual/pom.xml
core/branches/Branch_3_3/documentation/pom.xml
core/branches/Branch_3_3/documentation/releasenotes/pom.xml
core/branches/Branch_3_3/jmx/pom.xml
core/branches/Branch_3_3/parent/pom.xml
core/branches/Branch_3_3/pom.xml
core/branches/Branch_3_3/testing/pom.xml
core/branches/Branch_3_3/testsuite/pom.xml
core/branches/Branch_3_3/tutorials/eg/pom.xml
core/branches/Branch_3_3/tutorials/pom.xml
core/branches/Branch_3_3/tutorials/web/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: core/branches/Branch_3_3/cache-ehcache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-ehcache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/cache-ehcache/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/cache-jbosscache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/cache-jbosscache/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/cache-jbosscache2/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/cache-oscache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-oscache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/cache-oscache/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/cache-swarmcache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-swarmcache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/cache-swarmcache/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/connection-c3p0/pom.xml
===================================================================
--- core/branches/Branch_3_3/connection-c3p0/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/connection-c3p0/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/connection-proxool/pom.xml
===================================================================
--- core/branches/Branch_3_3/connection-proxool/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/connection-proxool/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/core/pom.xml
===================================================================
--- core/branches/Branch_3_3/core/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/core/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/distribution/pom.xml
===================================================================
--- core/branches/Branch_3_3/distribution/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/distribution/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/documentation/manual/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/manual/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/documentation/manual/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/documentation/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/documentation/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/documentation/releasenotes/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/releasenotes/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/documentation/releasenotes/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/jmx/pom.xml
===================================================================
--- core/branches/Branch_3_3/jmx/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/jmx/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/parent/pom.xml
===================================================================
--- core/branches/Branch_3_3/parent/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/parent/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -32,7 +32,7 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
<packaging>pom</packaging>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<name>Hibernate Core Parent POM</name>
<description>The base POM for all Hibernate Core modules.</description>
@@ -53,9 +53,9 @@
</licenses>
<scm>
- <connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</developerConnection>
- <url>https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</url>
+ <connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</developerConnection>
+ <url>https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</url>
</scm>
<ciManagement>
Modified: core/branches/Branch_3_3/pom.xml
===================================================================
--- core/branches/Branch_3_3/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/testing/pom.xml
===================================================================
--- core/branches/Branch_3_3/testing/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/testing/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/testsuite/pom.xml
===================================================================
--- core/branches/Branch_3_3/testsuite/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/testsuite/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/tutorials/eg/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/eg/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/tutorials/eg/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tutorials</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/tutorials/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/tutorials/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -31,7 +31,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/tutorials/web/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/web/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
+++ core/branches/Branch_3_3/tutorials/web/pom.xml 2008-09-10 18:19:01 UTC (rev 15185)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tutorials</artifactId>
- <version>3.3.1.GA</version>
+ <version>3.3.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
16 years, 3 months
Hibernate SVN: r15184 - in core/tags: hibernate-3.3.1.GA and 35 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 14:18:44 -0400 (Wed, 10 Sep 2008)
New Revision: 15184
Added:
core/tags/hibernate-3.3.1.GA/
core/tags/hibernate-3.3.1.GA/cache-ehcache/pom.xml
core/tags/hibernate-3.3.1.GA/cache-jbosscache/pom.xml
core/tags/hibernate-3.3.1.GA/cache-jbosscache2/pom.xml
core/tags/hibernate-3.3.1.GA/cache-oscache/pom.xml
core/tags/hibernate-3.3.1.GA/cache-swarmcache/pom.xml
core/tags/hibernate-3.3.1.GA/changelog.txt
core/tags/hibernate-3.3.1.GA/connection-c3p0/pom.xml
core/tags/hibernate-3.3.1.GA/connection-proxool/pom.xml
core/tags/hibernate-3.3.1.GA/core/
core/tags/hibernate-3.3.1.GA/core/pom.xml
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cache/QueryKey.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cfg/Environment.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/context/JTASessionContext.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/DerbyDialect.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/DerbyConcatFunction.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/type/NumericBooleanType.java
core/tags/hibernate-3.3.1.GA/core/src/test/java/org/hibernate/cache/
core/tags/hibernate-3.3.1.GA/distribution/pom.xml
core/tags/hibernate-3.3.1.GA/documentation/manual/pom.xml
core/tags/hibernate-3.3.1.GA/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml
core/tags/hibernate-3.3.1.GA/documentation/pom.xml
core/tags/hibernate-3.3.1.GA/documentation/releasenotes/pom.xml
core/tags/hibernate-3.3.1.GA/jmx/pom.xml
core/tags/hibernate-3.3.1.GA/parent/pom.xml
core/tags/hibernate-3.3.1.GA/pom.xml
core/tags/hibernate-3.3.1.GA/testing/pom.xml
core/tags/hibernate-3.3.1.GA/testing/src/main/java/org/hibernate/junit/UnitTestCase.java
core/tags/hibernate-3.3.1.GA/testsuite/pom.xml
core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java
core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java
core/tags/hibernate-3.3.1.GA/testsuite/src/test/resources/log4j.properties
core/tags/hibernate-3.3.1.GA/tutorials/eg/pom.xml
core/tags/hibernate-3.3.1.GA/tutorials/pom.xml
core/tags/hibernate-3.3.1.GA/tutorials/web/pom.xml
Removed:
core/tags/hibernate-3.3.1.GA/cache-ehcache/pom.xml
core/tags/hibernate-3.3.1.GA/cache-jbosscache/pom.xml
core/tags/hibernate-3.3.1.GA/cache-jbosscache2/pom.xml
core/tags/hibernate-3.3.1.GA/cache-oscache/pom.xml
core/tags/hibernate-3.3.1.GA/cache-swarmcache/pom.xml
core/tags/hibernate-3.3.1.GA/changelog.txt
core/tags/hibernate-3.3.1.GA/connection-c3p0/pom.xml
core/tags/hibernate-3.3.1.GA/connection-proxool/pom.xml
core/tags/hibernate-3.3.1.GA/core/
core/tags/hibernate-3.3.1.GA/core/pom.xml
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cache/QueryKey.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cfg/Environment.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/context/JTASessionContext.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/DerbyDialect.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java
core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java
core/tags/hibernate-3.3.1.GA/distribution/pom.xml
core/tags/hibernate-3.3.1.GA/documentation/manual/pom.xml
core/tags/hibernate-3.3.1.GA/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml
core/tags/hibernate-3.3.1.GA/documentation/pom.xml
core/tags/hibernate-3.3.1.GA/documentation/releasenotes/pom.xml
core/tags/hibernate-3.3.1.GA/jmx/pom.xml
core/tags/hibernate-3.3.1.GA/parent/pom.xml
core/tags/hibernate-3.3.1.GA/pom.xml
core/tags/hibernate-3.3.1.GA/testing/pom.xml
core/tags/hibernate-3.3.1.GA/testing/src/main/java/org/hibernate/junit/UnitTestCase.java
core/tags/hibernate-3.3.1.GA/testsuite/pom.xml
core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java
core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java
core/tags/hibernate-3.3.1.GA/testsuite/src/test/resources/log4j.properties
core/tags/hibernate-3.3.1.GA/tutorials/eg/pom.xml
core/tags/hibernate-3.3.1.GA/tutorials/pom.xml
core/tags/hibernate-3.3.1.GA/tutorials/web/pom.xml
Log:
[maven-release-plugin] copy for tag hibernate-3.3.1.GA
Copied: core/tags/hibernate-3.3.1.GA (from rev 15071, core/branches/Branch_3_3)
Deleted: core/tags/hibernate-3.3.1.GA/cache-ehcache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-ehcache/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/cache-ehcache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,94 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-ehcache</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate Ehcache Integration</name>
- <description>Integration of Hibernate with Ehcache</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache</artifactId>
- <version>1.2.3</version>
- </dependency>
-
- <!-- testing deps -->
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-testing</artifactId>
- <version>${version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <scope>test</scope>
- </dependency>
- <!-- these are optional on core... :( -->
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.GA</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib</artifactId>
- <version>2.1_3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>asm</groupId>
- <artifactId>asm-attrs</artifactId>
- <version>1.5.3</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/cache-ehcache/pom.xml (from rev 15183, core/branches/Branch_3_3/cache-ehcache/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/cache-ehcache/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/cache-ehcache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,94 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-ehcache</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate Ehcache Integration</name>
+ <description>Integration of Hibernate with Ehcache</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>1.2.3</version>
+ </dependency>
+
+ <!-- testing deps -->
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ <version>${version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>99.0-does-not-exist</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>99.0-does-not-exist</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ <version>1.4.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- these are optional on core... :( -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.1_3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm-attrs</artifactId>
+ <version>1.5.3</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/cache-jbosscache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/cache-jbosscache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,125 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-jbosscache</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate JBossCache Integration</name>
- <description>Integration of Hibernate with JBossCache (based on JBossCache1.x APIs)</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-cache</artifactId>
- <version>1.4.1.GA</version>
- </dependency>
- <!-- jboss-cache (the one from the jboss repo, anyway) does not properly define its dependencies -->
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-system</artifactId>
- <version>4.0.2</version>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-common</artifactId>
- <version>4.0.2</version>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-minimal</artifactId>
- <version>4.0.2</version>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-j2se</artifactId>
- <version>200504122039</version>
- </dependency>
- <dependency>
- <groupId>concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <version>1.3.4</version>
- </dependency>
- <dependency>
- <groupId>jgroups</groupId>
- <artifactId>jgroups-all</artifactId>
- <version>2.2.7</version>
- </dependency>
-
- <!-- testing deps -->
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-testing</artifactId>
- <version>${version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <scope>test</scope>
- </dependency>
- <!-- these are optional on core... :( -->
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.GA</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib</artifactId>
- <version>2.1_3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>asm</groupId>
- <artifactId>asm-attrs</artifactId>
- <version>1.5.3</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/cache-jbosscache/pom.xml (from rev 15183, core/branches/Branch_3_3/cache-jbosscache/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/cache-jbosscache/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/cache-jbosscache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,125 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jbosscache</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate JBossCache Integration</name>
+ <description>Integration of Hibernate with JBossCache (based on JBossCache1.x APIs)</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-cache</artifactId>
+ <version>1.4.1.GA</version>
+ </dependency>
+ <!-- jboss-cache (the one from the jboss repo, anyway) does not properly define its dependencies -->
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-system</artifactId>
+ <version>4.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common</artifactId>
+ <version>4.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-minimal</artifactId>
+ <version>4.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-j2se</artifactId>
+ <version>200504122039</version>
+ </dependency>
+ <dependency>
+ <groupId>concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>1.3.4</version>
+ </dependency>
+ <dependency>
+ <groupId>jgroups</groupId>
+ <artifactId>jgroups-all</artifactId>
+ <version>2.2.7</version>
+ </dependency>
+
+ <!-- testing deps -->
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ <version>${version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>99.0-does-not-exist</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>99.0-does-not-exist</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ <version>1.4.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- these are optional on core... :( -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.1_3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm-attrs</artifactId>
+ <version>1.5.3</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/cache-jbosscache2/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/cache-jbosscache2/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,187 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-jbosscache2</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate JBossCache2.x Integration</name>
- <description>Integration of Hibernate with JBossCache (based on JBossCache2.x APIs)</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <version>2.1.1.GA</version>
- </dependency>
-
- <!-- test dependencies -->
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-testing</artifactId>
- <version>${version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <scope>test</scope>
- </dependency>
- <!-- this is optional on core :( and needed for testing -->
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.GA</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <testResources>
- <testResource>
- <filtering>false</filtering>
- <directory>src/test/java</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </testResource>
- <testResource>
- <filtering>true</filtering>
- <directory>src/test/resources</directory>
- </testResource>
- </testResources>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <!-- Skip a long-running test of a prototype class -->
- <exclude>**/ClusteredConcurrentTimestampRegionTestCase.java</exclude>
- </excludes>
- <systemProperties>
- <property>
- <name>hibernate.test.validatefailureexpected</name>
- <value>true</value>
- </property>
- <property>
- <name>jgroups.bind_addr</name>
- <value>${jgroups.bind_addr}</value>
- </property>
- <!-- There are problems with multicast and IPv6 on some
- OS/JDK combos, so we tell Java to use IPv4. If you
- have problems with multicast when running the tests
- you can try setting this to 'false', although typically
- that won't be helpful.
- -->
- <property>
- <name>java.net.preferIPv4Stack</name>
- <value>true</value>
- </property>
- <!-- Tell JGroups to only wait a short time for PING
- responses before determining coordinator. Speeds cluster
- formation during integration tests. (This is too
- low a value for a real system; only use for tests.)
- -->
- <property>
- <name>jgroups.ping.timeout</name>
- <value>500</value>
- </property>
- <!-- Tell JGroups to only require one PING response
- before determining coordinator. Speeds cluster
- formation during integration tests. (This is too
- low a value for a real system; only use for tests.)
- -->
- <property>
- <name>jgroups.ping.num_initial_members</name>
- <value>1</value>
- </property>
- <!-- Disable the JGroups message bundling feature
- to speed tests and avoid FLUSH issue -->
- <property>
- <name>jgroups.udp.enable_bundling</name>
- <value>false</value>
- </property>
- </systemProperties>
- <skipExec>${skipUnitTests}</skipExec>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <properties>
- <skipUnitTests>true</skipUnitTests>
- <!--
- Following is the default jgroups mcast address. If you find the testsuite runs very slowly, there
- may be problems with multicast on the interface JGroups uses by default on your machine. You can
- try to resolve setting 'jgroups.bind_addr' as a system-property to the jvm launching maven and
- setting the value to an interface where you know multicast works
- -->
- <jgroups.bind_addr>127.0.0.1</jgroups.bind_addr>
- </properties>
-
- <profiles>
- <profile>
- <id>test</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <skipUnitTests>false</skipUnitTests>
- </properties>
- </profile>
- </profiles>
-</project>
Copied: core/tags/hibernate-3.3.1.GA/cache-jbosscache2/pom.xml (from rev 15183, core/branches/Branch_3_3/cache-jbosscache2/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/cache-jbosscache2/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/cache-jbosscache2/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,157 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jbosscache2</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate JBossCache2.x Integration</name>
+ <description>Integration of Hibernate with JBossCache (based on JBossCache2.x APIs)</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>2.1.1.GA</version>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ <version>${version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- this is optional on core :( and needed for testing -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <filtering>true</filtering>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- Skip a long-running test of a prototype class -->
+ <exclude>**/ClusteredConcurrentTimestampRegionTestCase.java</exclude>
+ </excludes>
+ <systemProperties>
+ <property>
+ <name>hibernate.test.validatefailureexpected</name>
+ <value>true</value>
+ </property>
+ <property>
+ <name>jgroups.bind_addr</name>
+ <value>${jgroups.bind_addr}</value>
+ </property>
+ <!-- There are problems with multicast and IPv6 on some
+ OS/JDK combos, so we tell Java to use IPv4. If you
+ have problems with multicast when running the tests
+ you can try setting this to 'false', although typically
+ that won't be helpful.
+ -->
+ <property>
+ <name>java.net.preferIPv4Stack</name>
+ <value>true</value>
+ </property>
+ <!-- Tell JGroups to only wait a short time for PING
+ responses before determining coordinator. Speeds cluster
+ formation during integration tests. (This is too
+ low a value for a real system; only use for tests.)
+ -->
+ <property>
+ <name>jgroups.ping.timeout</name>
+ <value>500</value>
+ </property>
+ <!-- Tell JGroups to only require one PING response
+ before determining coordinator. Speeds cluster
+ formation during integration tests. (This is too
+ low a value for a real system; only use for tests.)
+ -->
+ <property>
+ <name>jgroups.ping.num_initial_members</name>
+ <value>1</value>
+ </property>
+ <!-- Disable the JGroups message bundling feature
+ to speed tests and avoid FLUSH issue -->
+ <property>
+ <name>jgroups.udp.enable_bundling</name>
+ <value>false</value>
+ </property>
+ </systemProperties>
+ <skipExec>${skipUnitTests}</skipExec>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+ <skipUnitTests>true</skipUnitTests>
+ <!--
+ Following is the default jgroups mcast address. If you find the testsuite runs very slowly, there
+ may be problems with multicast on the interface JGroups uses by default on your machine. You can
+ try to resolve setting 'jgroups.bind_addr' as a system-property to the jvm launching maven and
+ setting the value to an interface where you know multicast works
+ -->
+ <jgroups.bind_addr>127.0.0.1</jgroups.bind_addr>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>test</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <skipUnitTests>false</skipUnitTests>
+ </properties>
+ </profile>
+ </profiles>
+</project>
Deleted: core/tags/hibernate-3.3.1.GA/cache-oscache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-oscache/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/cache-oscache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,31 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-oscache</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate OSCache Integration</name>
- <description>Integration of Hibernate with OSCache</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>opensymphony</groupId>
- <artifactId>oscache</artifactId>
- <version>2.1</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/cache-oscache/pom.xml (from rev 15183, core/branches/Branch_3_3/cache-oscache/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/cache-oscache/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/cache-oscache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,31 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-oscache</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate OSCache Integration</name>
+ <description>Integration of Hibernate with OSCache</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>oscache</artifactId>
+ <version>2.1</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/cache-swarmcache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-swarmcache/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/cache-swarmcache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,31 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-swarmcache</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate SwarmCache Integration</name>
- <description>Integration of Hibernate with SwarmCache</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>swarmcache</groupId>
- <artifactId>swarmcache</artifactId>
- <version>1.0RC2</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/cache-swarmcache/pom.xml (from rev 15183, core/branches/Branch_3_3/cache-swarmcache/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/cache-swarmcache/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/cache-swarmcache/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,31 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-swarmcache</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate SwarmCache Integration</name>
+ <description>Integration of Hibernate with SwarmCache</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>swarmcache</groupId>
+ <artifactId>swarmcache</artifactId>
+ <version>1.0RC2</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/changelog.txt
===================================================================
--- core/branches/Branch_3_3/changelog.txt 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/changelog.txt 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,2625 +0,0 @@
-Hibernate Changelog
-===================
-Note: Newer entries are automatically generated and the description might not
-match the actual issue resolution (i.e. a bug might not be a bug). Please
-refer to the particular case on JIRA using the issue tracking number to learn
-more about each case.
-
-
-Changes in version 3.3.0.GA (2008.08.13)
--------------------------------------------
-
-** Bug
- * [HHH-3430] - distribution bundles cglib directly instead of the hibernate repackaging
-
-
-Changes in version 3.3.0.CR2 (2008.07.31)
--------------------------------------------
-
-** Bug
- * [HHH-1697] - OracleDialect fails to recognize sequence accessible through syonyms when validating schema
- * [HHH-2604] - Isolator.JdbcDelegate masks the exception if it isn't possible to open a connection.
- * [HHH-2683] - "datediff" is declared as NoArgSQLFunction in H2Dialect, but actually accepts 3 arguments.
- * [HHH-3006] - ConcurrentModificationException in AbstractBatcher results in infinite loop
- * [HHH-3229] - Merge can fail when there is a transient entity reachable by multiple paths and at least one path does not cascade on merge
- * [HHH-3257] - Content images not displayed
- * [HHH-3260] - Hibernate wraps a listener init or destroy exception into an AssertionFailure
- * [HHH-3261] - Do not wrap exceptions raised by event listeners (at init or destroy time)
- * [HHH-3265] - change license url in pom to http://www.gnu.org/licenses/lgpl-2.1.html
- * [HHH-3266] - distribution bundle missing jta dependency
- * [HHH-3272] - using of Integer.valueOf(int), which is not available in JDK 1.4
- * [HHH-3282] - DB2Dialect should report supportsLobValueChangePropogation() == false
- * [HHH-3309] - Serialize/Deserialize problem in AbstractLazyInitializer with entitymode.MAP.
- * [HHH-3409] - ResultTransformers need smarter equals() and hashCode() impls
-
-** Improvement
- * [HHH-1786] - JTASessionContext.CleanupSynch does not remove sessions from currentSessionMap
- * [HHH-2060] - To be able to use <generator> with <composite-id>
- * [HHH-2506] - Make javassist the default ByteCodeProvider
- * [HHH-2875] - repackage cglib/asm under org.hibernate namespace
- * [HHH-3269] - upgrade to jDocBook plugin version 2.1.1
- * [HHH-3283] - protect BulkManipulationTest#testInsertWithGeneratedTimestampVersion where Dialect#supportsParametersInInsertSelect == false
- * [HHH-3358] - Enable JTATransactionFactory and JTATransaction factory to work without JNDI
- * [HHH-3390] - Use READ_COMMITTED for JBC 2 cache
-
-** Patch
- * [HHH-3294] - Version incorrectly incremented for unchanged persistent entity that is parent of a one to many relationship
-
-** Task
- * [HHH-3270] - follow up on documentation license questions
-
-
-
-Changes in version 3.3.0.CR1 (2008.04.28)
--------------------------------------------
-
-** Bug
- * [HHH-1312] - Unclosed ResultSet when using Identity
- * [HHH-1396] - Table.validateColumns fails on valid column
- * [HHH-1569] - Immutable Natural Id check fails with ArrayIndexOutOfBounds in some cases
- * [HHH-1593] - Infinite loop/StackOverflow when calling configuration.setListener(null)
- * [HHH-1753] - DB2Dialect.getCurrentTimestampSQLFunctionName() uses Oracle syntax
- * [HHH-1916] - param values in generator element should be trimmed during HbmBinding
- * [HHH-1920] - Incorrect documentation regarding XML manipulation in Hibernate reference manual (chapter 18.3).
- * [HHH-1956] - Interceptor.afterTransactionCompletion not called with JTATransaction (CacheSynchronization.hibernateTransaction not set)
- * [HHH-2159] - NullPointerException in FromElement#findIntendedAliasedFromElementBasedOnCrazyJPARequirements with 'hibernate.query.jpaql_strict_compliance' enabled
- * [HHH-2164] - Minor bug in section "20.1.1. Customizing the schema"
- * [HHH-2200] - Memory leak in AbstractBatcher with Generated Properties
- * [HHH-2320] - Regression: optional properties under a <join> tag no longer update properly
- * [HHH-2503] - AbstractEntityPersister swallows JDBCExceptions in processGeneratedProperties
- * [HHH-2513] - Abusive WARN logged during deserialization of replicated SessionFactory
- * [HHH-2542] - NullPointerException in TypeFactory.replaceAssociations for ComponentType
- * [HHH-2553] - New LoadContexts Implementation causing possible performance degradation
- * [HHH-2593] - Keyword UNION is prefixed with "this_." in filter conditions
- * [HHH-2616] - No event is fired on Collection recreate/remove/update action
- * [HHH-2627] - Generated properties leak prepared statements in Hibernate 3.2.3 and higher.
- * [HHH-2631] - Leaking PreparedStatement and ResultSet via CollectionLoadContext instances maintained in Map collectionLoadContexts in LoadContexts
- * [HHH-2711] - PropertyAccessException with backref and <composite-map-key/>
- * [HHH-2726] - spelling o your CLASSPATH
- * [HHH-2728] - Calling session.clear() while retrieving objects via an iterator will cause a "LazyInitializationException - No Session" by the CGLIBLazyInitializer
- * [HHH-2788] - Oracl8iDialect No Dialect mapping for JDBC type 91
- * [HHH-2795] - CollectionLoadContexts for empy collections are not removed until PersistenceContext.clear()
- * [HHH-2816] - DefaultFlushEntityEventListener.checkNaturalId() causes extra SELECTs on read-only entities
- * [HHH-2833] - insert-select query fails with NPE when select includes join
- * [HHH-2857] - schemaSupport for HSQLDialect remote connections doesn't work
- * [HHH-2861] - cascade="delete-orphan,all" is ignored
- * [HHH-2863] - testsuite fix-ups for maven and/or directory changes
- * [HHH-2864] - Merging a detached instance with a new child in a unidirectional one-to-many association fails if the parent was previously loaded as a proxy
- * [HHH-2892] - skip up-to-date checks of query cache for natural-id only if immutable
- * [HHH-2928] - optimizers for enhanced id generators should be synchronized against multi-threaded access
- * [HHH-2948] - QueryStatistics.executionMinTime always = 0
- * [HHH-3111] - WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getStatus() implemented incorrect
- * [HHH-3140] - Region prefix ignored for entities and collections
-
-** Deprecation
- * [HHH-2755] - Wrong "jsdk.jar" referenced in the tutorial
-
-** Improvement
- * [HHH-1786] - JTASessionContext.CleanupSynch does not remove sessions from currentSessionMap
- * [HHH-2048] - Incomplete MappingException at org.hibernate.mapping.SimpleValue
- * [HHH-2156] - Section 19.3, "Managing the caches" doesn't document CacheMode.IGNORE
- * [HHH-2533] - redesign Cache/CacheProviders
- * [HHH-2662] - Workaround PostgreSQL issues in testsuite
- * [HHH-2663] - Map java.sql.Types.REAL to Hibernate FloatType for auto-discovery stuff
- * [HHH-2665] - Split Oracle9Dialect into Oracle9iDialect and Oracle10gDialect
- * [HHH-2669] - Unequivocally map MySQL LOB types to the LONG variant
- * [HHH-2682] - support for auto-discovery of H2 dialect
- * [HHH-2696] - Consider migrating to slf4j
- * [HHH-2761] - Handle null and empty string consistently in PropertiesHelper
- * [HHH-2778] - TransactionManagerLookup implementation for Bitronix Transaction Manager
- * [HHH-2789] - Section 19.2 of the documentation does not show OSCache as supporting clusters. It does.
- * [HHH-2822] - timestamp extraction functions for SAPDBDialect
- * [HHH-2826] - IS [NOT] NULL checks with component values
- * [HHH-2859] - Introduce a 'Work' API for user to perform JDBC work
- * [HHH-3131] - Add a method to ActionQueue to tell whether there are currently entries in the executions collection
-
-** New Feature
- * [HHH-1] - Optimize Hibernate for the bulk insertion of related entities
- * [HHH-2555] - Create new RegionFactory for JBossCache
- * [HHH-2884] - Provide a sessionFactory close event or hook for the event listeners
-
-** Patch
- * [HHH-952] - Patch to allow subqueries with joins using Criteria API and Subqueries with DetachedCriteria
- * [HHH-2070] - Expand DB2Dialect auto-discovery support (Martin Renner)
- * [HHH-2519] - Schema dropping not documented with hibernate.hbm2ddl.auto=create
- * [HHH-2630] - Hibernate Dialect is not auto-detected for Sybase ASE and DB2 (Shelley McGowan)
- * [HHH-2758] - Patch IngresDialect based on certification
- * [HHH-2839] - Don't use dummy dual table for hsqldb (David Bala?ic)
- * [HHH-2849] - Better error logging in IdentifierGeneratorFactory (Antony Stubbs)
- * [HHH-2957] - ActionQueue Insertion sort performance degrades exponentially (Jay Erb)
- * [HHH-3084] - DialectFactory detection of Ingres metadata (Michael Leo)
-
-** Task
- * [HHH-2702] - Officially move to JDK 1.4
- * [HHH-2704] - Migrate to Maven2 for build
-
-
-Changes in version 3.2.6 (2008.02.07)
--------------------------------------------
-
-** Bug
- * [HHH-925] - DetachedCriteria.createCriteria not working with alias
- * [HHH-1312] - Unclosed ResultSet when using Identity
- * [HHH-1329] - SchemaValidator fail when views are involved
- * [HHH-1593] - Infinite loop/StackOverflow when calling configuration.setListener(null)
- * [HHH-1685] - DetachedCriteria doesn't create alias on subcriteria
- * [HHH-1753] - DB2Dialect.getCurrentTimestampSQLFunctionName() uses Oracle syntax
- * [HHH-1916] - param values in generator element should be trimmed during HbmBinding
- * [HHH-1956] - Interceptor.afterTransactionCompletion not called with JTATransaction (CacheSynchronization.hibernateTransaction not set)
- * [HHH-2016] - Oracle9Dialect registers last_day() function as "lastday"
- * [HHH-2159] - NullPointerException in FromElement#findIntendedAliasedFromElementBasedOnCrazyJPARequirements with 'hibernate.query.jpaql_strict_compliance' enabled
- * [HHH-2200] - Memory leak in AbstractBatcher with Generated Properties
- * [HHH-2261] - Setting hibernate.hbm2ddl.auto=validate causes problems on mySQL with numeric fields
- * [HHH-2320] - Regression: optional properties under a <join> tag no longer update properly
- * [HHH-2503] - AbstractEntityPersister swallows JDBCExceptions in processGeneratedProperties
- * [HHH-2542] - NullPointerException in TypeFactory.replaceAssociations for ComponentType
- * [HHH-2593] - Keyword UNION is prefixed with "this_." in filter conditions
- * [HHH-2598] - Mapping a collection of entities from two different classes with the same collection name results in duplicate backref property exception if collection keys are not null
- * [HHH-2616] - No event is fired on Collection recreate/remove/update action
- * [HHH-2627] - Generated properties leak prepared statements in Hibernate 3.2.3 and higher.
- * [HHH-2728] - Calling session.clear() while retrieving objects via an iterator will cause a "LazyInitializationException - No Session" by the CGLIBLazyInitializer
- * [HHH-2788] - Oracl8iDialect No Dialect mapping for JDBC type 91
- * [HHH-2795] - CollectionLoadContexts for empy collections are not removed until PersistenceContext.clear()
- * [HHH-2816] - DefaultFlushEntityEventListener.checkNaturalId() causes extra SELECTs on read-only entities
- * [HHH-2833] - insert-select query fails with NPE when select includes join
- * [HHH-2857] - schemaSupport for HSQLDialect remote connections doesn't work
- * [HHH-2861] - cascade="delete-orphan,all" is ignored
- * [HHH-2864] - Merging a detached instance with a new child in a unidirectional one-to-many association fails if the parent was previously loaded as a proxy
- * [HHH-2892] - skip up-to-date checks of query cache for natural-id only if immutable
- * [HHH-2928] - optimizers for enhanced id generators should be synchronized against multi-threaded access
- * [HHH-2948] - QueryStatistics.executionMinTime always = 0
-
-** Improvement
- * [HHH-1630] - duplicate property mapping - more details
- * [HHH-1696] - Add outer join support for aliases on DetachedCriteria
- * [HHH-2048] - Incomplete MappingException at org.hibernate.mapping.SimpleValue
- * [HHH-2682] - support for auto-discovery of H2 dialect
- * [HHH-2761] - Handle null and empty string consistently in PropertiesHelper
- * [HHH-2822] - timestamp extraction functions for SAPDBDialect
- * [HHH-2826] - IS [NOT] NULL checks with component values
- * [HHH-2852] - Better error messages when schema validation fails
-
-** Patch
- * [HHH-952] - Patch to allow subqueries with joins using Criteria API and Subqueries with DetachedCriteria
- * [HHH-2070] - Expand DB2Dialect auto-discovery support (Martin Renner)
- * [HHH-2839] - Don't use dummy dual table for hsqldb (David Bala?ic)
- * [HHH-2849] - Better error logging in IdentifierGeneratorFactory (Antony Stubbs)
- * [HHH-2957] - ActionQueue Insertion sort performance degrades exponentially (Jay Erb)
- * [HHH-3084] - DialectFactory detection of Ingres metadata (Michael Leo)
-
-** Task
- * [HHH-2559] - http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd needs to be updated
- * [HHH-3085] - Remove connector.jar (unnecessary library)
- * [HHH-3086] - Remove jdbc2_0-stdext.jar (unnecessary library)
-
-
-Changes in version 3.2.5 (2007.07.31)
--------------------------------------------
-
-** Bug
- * [HHH-1116] - batch-size typo
- * [HHH-1561] - Missing " in Documentation for H3, Chapter 15.8
- * [HHH-1569] - Immutable Natural Id check fails with ArrayIndexOutOfBounds in some cases
- * [HHH-1694] - Documentation Outdated: "10.4.4. Queries in native SQL"
- * [HHH-2180] - minordocumentation error in hbm xml
- * [HHH-2201] - session.iterate() does not exist
- * [HHH-2267] - A copy/paste mistake in the documentation for <schemavalidator> ant task
- * [HHH-2334] - Documentation error in section 5.1.3
- * [HHH-2420] - Error in 2.5. Contextual Sessions
- * [HHH-2502] - The second level caching documentation states that ehcache is not distributed.
- * [HHH-2631] - Leaking PreparedStatement and ResultSet via CollectionLoadContext instances maintained in Map collectionLoadContexts in LoadContexts
- * [HHH-2649] - Batcher configuration parameter incorrectly documented
- * [HHH-2711] - PropertyAccessException with backref and <composite-map-key/>
- * [HHH-2713] - duplicated phrase in docs "of the of the"
- * [HHH-2714] - Three typos in code examples
- * [HHH-2719] - adddress --> address
- * [HHH-2720] - Monetory --> Monetary
-
-** Improvement
- * [HHH-1022] - incomplete documentation in _README.txt in the lib directory
- * [HHH-1682] - Improve the description of differences between save() and persist()
- * [HHH-2048] - Incomplete MappingException at org.hibernate.mapping.SimpleValue
- * [HHH-2417] - Update book on Hibernate reference
- * [HHH-2418] - Refer HSQL DB website in chapter 1.2.3
- * [HHH-2487] - Typo in "5.1.7. version (optional)"
- * [HHH-2550] - Update API Class in 10.4.3. Criteria queries
- * [HHH-2662] - Workaround PostgreSQL issues in testsuite
- * [HHH-2663] - Map java.sql.Types.REAL to Hibernate FloatType for auto-discovery stuff
- * [HHH-2665] - Split Oracle9Dialect into Oracle9iDialect and Oracle10gDialect
-
-** Patch
- * [HHH-2520] - Miscellaneous config doc spelling fixes
- * [HHH-2630] - Hibernate Dialect is not auto-detected for Sybase ASE and DB2 (Shelley McGowan)
- * [HHH-2758] - Patch IngresDialect based on certification
-
-** Task
- * [HHH-2551] - Deprecate org.hibernate.criterion.Expression
- * [HHH-2566] - Replace usages of FlushMode.NEVER with FlushMode.MANUAL
- * [HHH-2567] - Update reference to use FlushMode.MANUAL
- * [HHH-2568] - Hibernate javadoc overview refering wrong classes and packages
-
-
-Changes in version 3.2.4.sp1 (2007.05.18)
--------------------------------------------
-
-** Bug
- * [HHH-2605] - Since 3.2.4 no value specified for row id
- * [HHH-2613] - LockMode.FORCE on non versioned entity leads to NPE
-
-
-Changes in version 3.2.4 (2007.05.09)
--------------------------------------------
-
-** Bug
- * [HHH-511] - reattach object from same session
- * [HHH-2316] - org.hibernate.cache.CacheKey.equals() can cause PropertyAccessException to be thrown
- * [HHH-2553] - New LoadContexts Implementation causing possible performance degradation
- * [HHH-2602] - instrumented many-to-one problem with aggressive release
-
-** Deprecation
- * [HHH-2603] - Deprecate the Session.connection() method
-
-** Improvement
- * [HHH-2549] - Warn users explicitly about schemaexport and schemaupdate does not support annotations
-
-** New Feature
- * [HHH-1] - Optimize Hibernate for the bulk insertion of related entities
-
-** Patch
- * [HHH-2301] - Identity generator with custom insert SQL broken in 3.2 (Scott Rankin and Gail Badner)
- * [HHH-2336] - paremeterizable and typedef-able UserCollectionType (Holger Brands)
- * [HHH-2580] - Performace: Too many lookups of WAS extended transaction support (Jesper Udby)
-
-
-Changes in version 3.2.3 (2007.04.02)
--------------------------------------------
-
-** Bug
- * [HHH-2376] - Query with fully qualified entity class fails
- * [HHH-2392] - LockModes referencing non-root joined-subclass class in HQL/Criteria
- * [HHH-2393] - Generated properties leave open ResultSet on Batcher to be closed on transaction completion
- * [HHH-2397] - hilo generator can generate negative numbers because of arithmetic overflow
- * [HHH-2469] - ArrayIndexOutOfBoundsException during update by rowid
- * [HHH-2476] - PersistentMap.put() incorrect on uninitialized, non-extra-lazy map
- * [HHH-2481] - Big memory leak in the use of CGLIB
- * [HHH-2499] - incorrect assertion failure relating to generated property values
- * [HHH-2513] - Abusive WARN logged during deserialization of replicated SessionFactory
- * [HHH-2521] - Fix cascading of merge across component properties
- * [HHH-2532] - update/delete executeUpdate() causes problems with JBossCache (at least in opt-locking setups)
-
-** Improvement
- * [HHH-2495] - encapsulate the notion of state pertaining to processing a result set
- * [HHH-2534] - better error message for illegal 'collection dereference' in HQL query
- * [HHH-2535] - Change Cache' Cache71Dialect so that sequence support returns false
-
-** New Feature
- * [HHH-2471] - create a set of "enhanced" generators
- * [HHH-2500] - apply Terradata certification results
-
-** Patch
- * [HHH-2367] - InformixDialect uses wrong data type
- * [HHH-2489] - SQL comments for HQL bulk operations
-
-
-Changes in version 3.2.2 (2007.01.24)
--------------------------------------------
-
-** Bug
- * [HHH-1471] - If the 'generated' attribute is set to 'insert' or 'always' on the property of a component it is ignored and the value is not read from the database.
- * [HHH-1646] - Bad code in FastClass.equals
- * [HHH-1889] - LockMode.UPGRADE not applied in all cases for SQL Server / Sybase
- * [HHH-2112] - ClassCastException in StatefulPersistenceContext.getCachedDatabaseSnapshot(...)
- * [HHH-2221] - MySQL temp table DDL and isolation
- * [HHH-2238] - SQLQuery executeUpdate doesn't respect Query.setFlushMode()
- * [HHH-2251] - Settings build unnecessary in schemaupdate/schemavalidate
- * [HHH-2257] - Query.iterate() results differ from Query.list() 2
- * [HHH-2259] - autoflush and autoclose not longer occur in JTA environment with hibernate 3.2
- * [HHH-2264] - NPE when NamedQuery contains space before variable name
- * [HHH-2274] - Collection ordering when many to many order by is used is not respected
- * [HHH-2275] - Mapping a composite element as a map key using formulas can lead to AOOBE
- * [HHH-2284] - HQL: selecting components inside components doesn't work
- * [HHH-2291] - collection based on property-ref not handled correctly during reattch
- * [HHH-2292] - merge detached instance fails to persist collection changes in case of bare collection reference
- * [HHH-2356] - NullableType.toString(Object) should account for nulls
- * [HHH-2366] - Changing a component's value does not trigger an update during flush
- * [HHH-2378] - replicate() of non-versioned entiy can result in wrong value for version in entity cache
-
-** Improvement
- * [HHH-1851] - relax special handling of 'id' property
- * [HHH-2130] - SQLQuery does not autoflush all entities used in the query
- * [HHH-2193] - Introduce a flag to avoid checking NamedQuery at startup
- * [HHH-2242] - Consider Allowing Optimistic Lock Strategies other than 'Version' with joined-subclass
- * [HHH-2250] - Create an appropriate error message if Query.setEntity is passed a NULL value
- * [HHH-2282] - PersistentClass property lookups do not properly account for embedded composite identifiers
- * [HHH-2286] - dialect informational metadata
- * [HHH-2372] - Allow tooling to create Settings via SettingsFactory without contacting the db
-
-** New Feature
- * [HHH-2246] - No way to specify CACHE_PROVIDER_CONFIG in HibernateServiceMBean
-
-** Patch
- * [HHH-2300] - Updated dialect for H2 database engine
- * [HHH-2371] - enhancements to C3P0ConnectionProvider
-
-** Task
- * [HHH-2032] - update c3p0 to 0.9.1
-
-
-
-Changes in version 3.2.1 (2006.11.16)
--------------------------------------------
-
-** Bug
- * [HHH-939] - 'class' property in HQL results in incorrect SQL for joined-subclass
- * [HHH-1401] - session.merge() executes unnecessary updates when one-to-many relationship is defined.
- * [HHH-1460] - Inconsistent behavior when using Session.get() with multiple subclasses
- * [HHH-1564] - deleting versioned object with collection leads to unecessary update
- * [HHH-1629] - SchemaUpdate/validator doesn't listen to quoting
- * [HHH-1631] - Missing table in SQL from clause that is referenced in where clause when using joined subclass
- * [HHH-1651] - hibernate does not find an existing sequence from an Oracle database
- * [HHH-1663] - <any/> with collection will produce "AssertionFailure: collection was not processed by flush()"
- * [HHH-1737] - Add a ConnectionWrapper interface to allow access to the underlying connection from a BorrowedConnectionProxy
- * [HHH-1756] - Proxy objects are not removed from the BatchFetchQueue during a session evict
- * [HHH-1774] - Component parameters bound incorrectly
- * [HHH-1921] - "dirty, but no dirty properties" thrown when Interceptor resets properties.
- * [HHH-1986] - javassist throws InvocationTargetException instead of original checked Exception
- * [HHH-2027] - merge listener over-writes Interceptor changes to component state for a transient entity
- * [HHH-2044] - DefaultMergeEventListener.entityIsDetached call StaleObjectStateException with wrong identifier
- * [HHH-2082] - UpdateTimestampsCache.isUpToDate returns before checking all spaces
- * [HHH-2108] - cacheable files broken
- * [HHH-2138] - merge with bidirectional one-to-one may fail
- * [HHH-2145] - set.retainAll calling set.addAll
- * [HHH-2174] - Wrong log message in SessionImpl.afterTransactionCompletion(...)
- * [HHH-2199] - Unique constraints on nullable columns should not be generated with unique-key is used and supportsNotNullUnique=false
- * [HHH-2202] - Clearing the connection warnings even when log is > WARN to workaround a Sybase issue
- * [HHH-2206] - SessionImpl tries to deserialize itself in an incorrect order
- * [HHH-2207] - Suggested fix for HQL - MySQL setMaxResults issue
- * [HHH-2226] - org.hibernate.hql.ast.tree.FromElementType contains warning log message that should be debug instead
- * [HHH-2229] - Performance issue with fix for HHH-1293, CGLIBLazyInitializer may be slower for certain Java classes
- * [HHH-2236] - Lazy property + setReadOnly + Instrumented classes results in NullPointerException when accessing lazy property
-
-** Improvement
- * [HHH-2037] - provide Query.setProperties(Map)
- * [HHH-2042] - Typo in FlushMode.MANUAL Javadoc
- * [HHH-2057] - Add "remove" cascading style to CascadeStyle for XML mappings
- * [HHH-2127] - Document <filter-def condition="defaultCondition"> and <filter-def>defaultCondition
- * [HHH-2135] - Hibernate Deserialization: In org.hibernate.type.SerializableType the code makes a test for the return of a null object by simply testing the object as to whether or not it is null.
- * [HHH-2185] - introduce setting to control cglib caching of classes
- * [HHH-2203] - Make Post*Events extend AbstractEvent
- * [HHH-2208] - Table schema use in DatabaseMetadata
- * [HHH-2209] - ehcache.jar is old and does not contain the SingletonCacheProvider which are advised in exception messages
- * [HHH-2217] - Collection write methods and dirtying the collection
-
-** New Feature
- * [HHH-2205] - Dialect for Intersystems' Cache SQL 2007.1
-
-** Patch
- * [HHH-1767] - read-only cache for immutable collection causes unnecessary warning
-
-** Task
- * [HHH-2219] - Upgrade to Javassist 3.4
-
-
-Changes in version 3.2.0.ga (16.10.2006)
------------------------------------------
-(retag of 3.2.0.cr5 (2006.10.16))
-
-Changes in version 3.2.0.cr5 (04.10.2006)
--------------------------------------------
-
-** Bug
- * [HHH-1668] - PersistentSet write methods mark collection as dirty even if entry is not written
- * [HHH-1714] - Session.get() behavior
- * [HHH-1891] - Since rc3 deprecation Warning: The syntax 'TYPE=storage_engine' is deprecated and will be removed in MySQL 5.2.
-
-** Improvement
- * [HHH-2093] - PERSIST_ON_FLUSH ineffective for recursive object graphs
- * [HHH-2103] - Rolling back 'SELECT is mandatory' on JPA strict compliance
-
-** Task
- * [HHH-1931] - verify that the instrument tasks actually work
-
-
-Changes in version 3.2.0.cr4 (24.08.2006)
--------------------------------------------
-
-** Bug
- * [HHH-1293] - java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
- * [HHH-1677] - optimistic-lock="dirty|all" is ignored at delete time
- * [HHH-1710] - persistent collections with property-ref to secondary tables cannot be joined in HQL
- * [HHH-1713] - AbstractEntityPersister causes an exception when a row in a joined table is missing with fetch="select"
- * [HHH-1740] - Build-time instrumentation breaks lazy="proxy"
- * [HHH-1750] - Exception ORA-01000 too many open cursors by generated="insert"
- * [HHH-1806] - No Dialect mapping for JDBC type: 3
- * [HHH-1848] - A session.lock generates a query with a version column in a joined subclass which does not exist
- * [HHH-1892] - finish HHH-1789 for ordered and sorted collections
- * [HHH-1898] - With hibernate 3.2.0-cr3 there is an hql parsing error on a one-to-one relation
- * [HHH-1924] - ForeignKeys: TransientObjectException is thrown without a message because of a wrong bracket in the code
- * [HHH-1927] - persist() and then merge() not handled correctly for multiple entity instances representing the same logical state
- * [HHH-1937] - Proxy creation failure leads to NPEs
- * [HHH-1943] - PersistenceContext not checked to see whether the associated entity is transient or not
- * [HHH-1944] - generated subqueries and jpaql compliance (derived select clause) check
- * [HHH-1947] - OF part of MEMBER OF is optional
- * [HHH-1948] - Query Idetification variables are case insensitive in JPA
- * [HHH-1949] - having trim(BOTH from c.name) translated into having ltrim(rtrim(BOTH)) on DB2
- * [HHH-1954] - Proxies are never unassociated (evicted) from a session
- * [HHH-1958] - session.lock(LockMode.FORCE) can lead to NPE
- * [HHH-1963] - meta inheritance broken
- * [HHH-1992] - Some cascade actions should not trigger a property access on lazy properties
- * [HHH-2001] - javaassist does not setup the proper protection domain thus does not work with signed/secured deployments such as webstart
- * [HHH-2015] - where= does not set parenthesis leading to unexpected query when multiclause are used
- * [HHH-2017] - locate function defined on Oracle9Dialect is incorrect
- * [HHH-2022] - property names beginning with underscores cause Hibernate to generate invalid aliases
-
-** Improvement
- * [HHH-1470] - Enhance Hibernate-Mapping DTD Definition of type element
- * [HHH-1934] - logging NonUniqueObjectException and WrongClassException
- * [HHH-1941] - Be more specific about x not found and invalid mapping exceptions to allow tools to tell about it
- * [HHH-1968] - unify bytecode instrumentation
- * [HHH-1980] - disallow the mapping combination of <version/> and optimistic-lock
- * [HHH-2005] - more standard build script
- * [HHH-2023] - performance optimization of JTATransactionFactory.isTransactionInProgress()
-
-** Patch
- * [HHH-1271] - When using Stored Procedure for update or delete, the check is not done correctly.
-
-** Task
- * [HHH-1931] - verify that the instrument tasks actually work
-
-
-Chages in version 3.2 cr3 (2006.07.06)
--------------------------------------------
-
-** Bug
- * [HHH-1452] - Native SQL query is missing join if entity includes many-to-one on secondary table
- * [HHH-1507] - one-to-one can have formula or meta but not both of them.
- * [HHH-1552] - Error when using ?1 and parameterList
- * [HHH-1586] - ClassCastException in CollectionType.toLoggableString if using CustomCollectionType
- * [HHH-1732] - EhCache.toMap still assumes Serializable objects
- * [HHH-1734] - Connection leak when using hilo strategy in SE environment
- * [HHH-1741] - Bug in reference documentation
- * [HHH-1746] - NullPointerException at IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:195
- * [HHH-1748] - Setting a comment that contains a single quote on a query results in an unintuitive exception
- * [HHH-1763] - Bug in InputStream org.hibernate.util.ConfigHelper.getResourceAsStream(String resource)
- * [HHH-1791] - property update="false" ignored since 3.2.0.cr2
- * [HHH-1816] - serializing session from a named session factory to a different vm broken
- * [HHH-1822] - flushing entity linked to transient instance (non cascaded) should always fail
- * [HHH-1828] - registering a transaction marked for Rollback is illegal
- * [HHH-1833] - Not Generating HibernateException
- * [HHH-1838] - Wrong SQL generated for hql query on "any" relation
- * [HHH-1855] - booleans not properly handled in assignment clause of UPDATE statements
- * [HHH-1858] - wrong sql generated against many-to-any association table
- * [HHH-1871] - query type autodiscovery assume wrong column when mixing entities and scalars
-
-** Deprecation
- * [HHH-1792] - Callable update/insert/delete statements should not force rowcount out parameter
-
-** Improvement
- * [HHH-1617] - Check the second-level cache before adding a PK to a batch fetch
- * [HHH-1773] - Typo in ImprovedNamingStrategy
- * [HHH-1779] - Allow Session.remove() on transient object
- * [HHH-1789] - improve efficiency of collection initialization from L2 cache hits
- * [HHH-1795] - default cache provider to NoCacheProvider
- * [HHH-1796] - TreeCache based providers and Fqn
- * [HHH-1800] - session.get() / load() should raise exception when the id is of the wrong type
- * [HHH-1818] - remove() should force subsequent contains() calls to return false
- * [HHH-1831] - Batch loading the same EntityKey (one side of manytoone ) more than once
- * [HHH-1861] - More complete component handling in HQL
- * [HHH-1881] - introduce LoggableUserType interface
-
-** New Feature
- * [HHH-1709] - Be able to raise ENFE rather than LIE in proxies
- * [HHH-1727] - Add a SQLFunctionRegistry
- * [HHH-1817] - Introduce setting for JPA-QL strict compliance
- * [HHH-1826] - Built-in type for char[] -> VARCHAR Byte[] and Character[]
-
-** Patch
- * [HHH-1558] - Dialect for new database engine H2
- * [HHH-1847] - QBE 'like' clause with backslashes don't work with MySQL
-
-** Task
- * [HHH-1839] - rename FlushMode.NEVER -> FlushMode.MANUAL
-
-
-Changes in version 3.2 cr2 (2006.05.05)
--------------------------------------------
-
-** Bug
- * [HHH-1114] - The first (HSQL) Hibernate Application doesn't work as expected due to lack of database shutdown
- * [HHH-1175] - Exception when loading inheritance mapping in single file
- * [HHH-1560] - PropertiesHelper.resolvePlaceHolders() fails with non-String values in System properties
- * [HHH-1620] - Errors on max_lo <=1 boundaries
- * [HHH-1625] - Hibernate.isPropertyInitialized() returns false on instrumented transient object
- * [HHH-1648] - Exception while resuming a transaction is silently eaten
- * [HHH-1674] - Configuration serialization error: filterDefinitions map not serializable
- * [HHH-1695] - subsequent calls to non-existent proxy causes NPE
-
-** Improvement
- * [HHH-1266] - StatelessSession can implement refresh
- * [HHH-1414] - many-to-many and metadata order-by based on column from the target table
- * [HHH-1477] - Improve naming strategy for ANN-195
- * [HHH-1538] - aggregations functions in EJBQL queries does not return the appropriate types
- * [HHH-1670] - Update EhCache and EhCache provider to support EhCache 1.2
- * [HHH-1704] - Deduplicate unique constraints generation sharing the same column(s)
-
-** New Feature
- * [HHH-870] - support SQL updates in named queries
- * [HHH-1591] - Replace LazyInitializationException by EntityNotFoundException
- * [HHH-1719] - Provide a ClassTransformer interface to the BytecodeProvider
-
-
-Changes in version 3.2 cr1 (2006.03.27)
--------------------------------------------
-
-** Bug
- * [HHH-1453] - Broken exception handling in NullableType
-
-** Improvement
- * [HHH-227] - remove reflection optimizer
- * [HHH-587] - Make ResultTransformer available for all query methods
- * [HHH-1588] - delay inserts for insert-generated-identifiers outside transaction
- * [HHH-1590] - redesign how PostInsertIdentifierGenerators are handled at insertion
- * [HHH-1592] - allow SelectGenerator to use a defined natural-id (if one)
-
-** New Feature
- * [HHH-332] - create ability to add resulttransformer to HQL query
- * [HHH-1179] - support inline sequence id generation on Oracle using RETURNING clause
-
-
-Changes in version 3.2 alpha2 (2006.03.15)
--------------------------------------------
-
-** Bug
- * [HHH-535] - properties element causes exception in interface/abstract class
- * [HHH-1325] - ArrayOutOfBounds expected in DatabaseMetadata.isTable when specifing schema
- * [HHH-1435] - many-to-one lazy seems to be broken in 3.1.x
- * [HHH-1531] - NPE with many-to-many and property-ref
- * [HHH-1546] - generated version properties fail with multiple actions per flush
-
-** Improvement
- * [HHH-1540] - Better Error Feedback In CollectionEntry.postFlush(PersistentCollection)
- * [HHH-1555] - ConnectionReleaseMode.AFTER_STATEMENT and flushes
- * [HHH-1559] - introduce TransactionFactory.isTransactionInProgress to facilitate EJB3 joinTransaction handling
-
-
-Changes in version 3.2 alpha1 (2006.02.28)
--------------------------------------------
-
-** Bug
- * [HHH-687] - Exception QuerySyntaxError not really serializable
- * [HHH-1236] - Remove static reference to classloader, to avoid memory leak at webapp reload
- * [HHH-1287] - Problem with WAS ExtendedJTATransaction not available when using MDB
- * [HHH-1419] - Update + Exists doesn't seem to work
- * [HHH-1445] - SchemaUpdate closes shared ConnectionProvider
- * [HHH-1464] - QueryException from Query.getReturnAliases when query uses "fetch"
- * [HHH-1486] - Concurrent access issues with both SoftLimitMRUCache and SimpleMRUCache
- * [HHH-1508] - Session.createQuery() should not flush the session
-
-** Improvement
- * [HHH-1411] - Collection fetches and DISTINCT
- * [HHH-1412] - Collection fetches and firstResult/maxRows
- * [HHH-1416] - LockMode.FORCE to implement EJB3 LockModeType.WRITE
- * [HHH-1457] - support new optimisitc locking capabilities of JBossCache
- * [HHH-1466] - better handling of Antlr exceptions
- * [HHH-1516] - support DataDirect standard jdbc stored procedures
- * [HHH-1518] - Guarentee LockMode behaviors
- * [HHH-1520] - with clause with implied joins within an explicit join
- * [HHH-1526] - Improved DTDEntityResolver
-
-** New Feature
- * [HHH-1251] - Avoid replicating the clearing of TreeCache on SessionFactory..close()
- * [HHH-1410] - FlushMode.AUTO -> COMMIT when outside a transaction
- * [HHH-1447] - pluggable bytecode libraries
-
-
-Changes in version 3.1.2 (01.27.2006)
--------------------------------------------
-
-** Bug
- * [HHH-73] - Statistics for HQL queries use pre-processed query string
- * [HHH-1306] - HQL parsing problem with join fetching of arrays/collections of values
- * [HHH-1370] - Warning in hibernate-mapping-3.0.dtd
- * [HHH-1371] - MappingException is thrown when the same column is referenced with different case
- * [HHH-1386] - Numeric (long) literals not properly handled by HQL parser
- * [HHH-1390] - Session.isOpen() throws exeception when the session is closed with ThreadLocalSessionContext
- * [HHH-1391] - Invalid parameter index SQLException when using named parameters after positional parameters
- * [HHH-1392] - Proxies cannot be serialized after session is closed
- * [HHH-1398] - extends and entity-names broken with mapping-level package attribute
- * [HHH-1407] - return-join broken for entity collections
-
-** Improvement
- * [HHH-1364] - Defensive check of isClosed when obtaining a connection from ConnectionManager
- * [HHH-1367] - warn level log "this operation breaks ==" may be disturbing
-
-** New Feature
- * [HHH-1372] - Support for MySQL5 new varchar length
-
-** Patch
- * [HHH-1005] - Criteria LEFT JOIN capability when adding Order to associations
-
-** Task
- * [HHH-1373] - Document update versioned
-
-
-Changes in version 3.1.1 (01.13.2006)
--------------------------------------------
-
-** Bug
- * [HHH-853] - DML-style HQL queries and associations
- * [HHH-1281] - FORWARD_ONLY ScrollableResults#next() throw GenericJDBCException
- * [HHH-1286] - Set entity in HQL query without prefix -> incorrect SQL
- * [HHH-1308] - Session.createFilter(...).iterate() results in bogus column names for result set extraction
- * [HHH-1314] - float/double literals not sent to the database correctly
- * [HHH-1316] - SchemaUpdate : java.sql.SQLException: You cannot commit during a managed transaction!
- * [HHH-1328] - org.hibernate.util.SimpleMRUCache keeps a soft reference to the cache key, so cached values get collected prematurely
- * [HHH-1336] - ForeignGenerator does not handle transient entities with an entity-name properly
- * [HHH-1337] - Mapped <component> generated column names incorrect with ImprovedNamingStrategy
- * [HHH-1349] - HQL delete statement problem due to oracle lacking table aliases in delete clause
- * [HHH-1361] - creating temporary table for bulk delete will commit current transaction in managed environment such as J2EE
-
-** Improvement
- * [HHH-1019] - Native SQL return-property mapping doesn't support dot-syntax in return-property for components
- * [HHH-1290] - Defensive checking of session status
- * [HHH-1302] - query.getReturnTypes inconsistent
- * [HHH-1304] - better handling of borrowed connections in non-ON_CLOSE release semantics
- * [HHH-1309] - schemaupdate does not handle TableHiLoGenerator
- * [HHH-1339] - empty property name in mapping file gives imcomprehensible error message
- * [HHH-1344] - ANSI-SQL trim function for SQLServer
- * [HHH-1345] - ANSI-SQL mod function for SQLServer
- * [HHH-1346] - ANSI-SQL bit_length function for SQLServer
- * [HHH-1351] - <return-scalar name="blah"/> should be possible
- * [HHH-1360] - set autodiscovery flag for SQLQueries when resultsetmappings are used
-
-
-Changes in version 3.1 (12.12.2005)
--------------------------------------------
-
-** Bug
- * [HHH-849] - Cartesian product + implicit joins
- * [HHH-1065] - user provided connection not usable by default due to agressive release changes
- * [HHH-1101] - associations join fetched in HQL without owner being selected
- * [HHH-1133] - Comparators, defined for collections in mapping files, are not set
- * [HHH-1149] - NPE flushing reattached entity w/ non-mutable natural-id
- * [HHH-1170] - HQL 'cast' function doesn't work with MySQL 4 when casting to string
- * [HHH-1187] - Cannot delete a object having a delete-orphan collection when user_rollback_id is set
- * [HHH-1191] - HQL fails backward compatibility using classic translator
- * [HHH-1194] - hql delete statements with joined-subclass hierarchies with a mapped where attribute at the root
- * [HHH-1206] - Mappings.TableDescription is not serializable
- * [HHH-1212] - mismatch in entity-modes defined in DTD and EntityMode class
- * [HHH-1227] - ClassCastException on DOM4J replicate of Calendar property
- * [HHH-1239] - BinaryArithmeticOperatorNode.getDataType() does not properly handle date/time arithmetic
- * [HHH-1240] - Track connection leakage in JDBCContext.afterTransactionCompletion()
- * [HHH-1245] - Calling the Session should register it with the current JTA txn.
- * [HHH-1254] - Serialization of Sessions using JDBCTransactions with auto-flush/auto-close
-
-** New Feature
- * [HHH-1222] - Autodiscover scalar types in native-sql
- * [HHH-1243] - allow placeholders to system properties in config properties
- * [HHH-1244] - Support for MySQL5 stored procedures
- * [HHH-1260] - Configuration.mergeProperties()
-
-** Task
- * [HHH-1066] - Upgrade CGLIB to fix proxy memory leak
- * [HHH-1242] - upgrade ANTLR to 2.7.6rc1
-
-** Improvement
- * [HHH-860] - insert ... select ... and version numbers
- * [HHH-926] - TypeDef should be global
- * [HHH-1138] - No ConstraintName when using PostgreSQL
- * [HHH-1144] - Implement naming convention for temporary test failures
- * [HHH-1153] - PropertiesHelper fails reading primitive values from hibernate-mapping when doc has whitespace
- * [HHH-1182] - Access to filter metadata
- * [HHH-1183] - Getting sql "plan" for DML operations
- * [HHH-1197] - Support for HQL delete on MaxDB
- * [HHH-1198] - post-insert event pass the entity wo the id field filled when the generator is identity
- * [HHH-1213] - make JACC event listeners auto configurable (through initialize(Configuration))
- * [HHH-1215] - Added support for LVARCHAR in InformixDialect
- * [HHH-1218] - Add concat() function support to SAPDBDialect
- * [HHH-1255] - ThreadLocalSessionContext and Session serialization
-
-** Patch
- * [HHH-967] - executeUpdate on StatelessSession
- * [HHH-1172] - Missing configuration templates for the new MimerSQLDialect
-
-** Deprecation
- * [HHH-1229] - deprecate ability for entities to not define identifier properties
-
-
-Changes in version 3.1 rc3 (17.11.2005)
--------------------------------------------
-
-** Bug
- * [HHH-755] - Setter / Getter for property gDate are wrong
- * [HHH-764] - XML mapping
- * [HHH-1034] - The connection is closed *outside* the JTA transaction in TransactionHelper
- * [HHH-1062] - java:comp/UserTransaction not correct for JBoss
- * [HHH-1064] - Exception using JTATransaction in WebSphere 6
- * [HHH-1069] - Unnecessary commas generated in select with left outer joins
- * [HHH-1075] - New parser "not exists" command bug
- * [HHH-1077] - Typo in docs: "equiped"
- * [HHH-1080] - HQL delete fails on entities with where-fragments using operators other than '='
- * [HHH-1081] - missing parens in example code for Criteria Associations
- * [HHH-1084] - incorrect method name "sql" in Restrictions example, should be "sqlRestriction"
- * [HHH-1091] - Can't write transparent CurrentSessionContext for BMT
- * [HHH-1098] - Patch for build.sh to be able to build latest version on linux
- * [HHH-1106] - HQL "not in" generatad wrong SQL
- * [HHH-1111] - JDBCTransaction.rollback() results in a call to Interceptor.beforeTransactionCompletion()
- * [HHH-1128] - Column alias clashes under certain circumstances
- * [HHH-1146] - latest cvs(11/10/05) hibernate3 issue with classic query
- * [HHH-1156] - StatefulPersistenceContext not serializable when property-ref is used
- * [HHH-1160] - Incorrect use of getGeneratedKey() for Oracle
-
-** New Feature
- * [HHH-449] - korean hibernate reference manual
- * [HHH-1129] - use expected-type in 'untyped' Query.setParameter()
-
-** Improvement
- * [HHH-221] - Proxy for one-to-one with property-ref
- * [HHH-844] - move parameter "bookkeeping" into QueryTranslator
- * [HHH-1051] - "Compiled" native SQL queries are not cached
- * [HHH-1061] - import.sql should allow more human readable and usable files
- * [HHH-1078] - <dynamic-component> requires type on property
- * [HHH-1120] - Make NamingStrategy to work nicely with HA and EJB3 naming strategy
- * [HHH-1142] - added getSelectSequenceNextValString() and getCurrentTimestampSelectString() to TimesTenDialect
-
-** Patch
- * [HHH-1063] - support for 'locate' function in SQLServer and Sybase dialects
- * [HHH-1090] - Allow subqueries on criteria to obtain non-string results
- * [HHH-1095] - Hibernate takes incorrect HasCode when a lot of CompositeKeys and Lazy loading is involved
- * [HHH-1103] - finalize method filter for proxies
- * [HHH-1136] - more meaningful AssertionFailure message in org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(...)
-
-
-Changes in version 3.1 rc2 (17.10.2005)
--------------------------------------------
-** Bug
- * [HHH-1045] - Example contains inner classes that aren't serializable
- * [HHH-1055] - optimistic-lock is not inherited from class to subclass et.al.
-
-** Improvement
- * [HHH-702] - auto detect aliasing for collection properties (coll.key, coll.id etc.)
- * [HHH-1038] - make 'auto' the default for hibernate.connection.release_mode
- * [HHH-1042] - determine "expected type" of parameters during HQL parsing
-
-
-Changes in version 3.1 rc1 (07.10.2005)
--------------------------------------------
-** Bug
- * [HHH-528] - component.manyToOne.id in HQL causes join
- * [HHH-871] - Configuration.setListener(String type, Object listener) throws ClassCastException
- * [HHH-873] - referencing raw HQL FromElement alias outide the from clause of update and delete statements generates incorrect sql
- * [HHH-876] - PreparedStatement being closed before being executed by AbstractBatcher
- * [HHH-884] - SchemaExport does not propagate parent indexes to <union-subclass> tables
- * [HHH-887] - Aggressive release and Session.connection()
- * [HHH-893] - custom tuplizer are not instantiated for components
- * [HHH-905] - $PlaceHolder$ remains in generated SQL when filter is enabled
- * [HHH-907] - optimistic-lock="false" for timestamped object results in SQLException: Invalid column index
- * [HHH-908] - CLONE -NullPointerException when using BigInteger in a query
- * [HHH-911] - CGLIBLazyInitializer and Exceptions
- * [HHH-913] - NPE in CMTTransaction since javax.transaction.Transaction is never set
- * [HHH-918] - impossible to move objects to another session
- * [HHH-924] - Useless OracleErrorCodeConverter (and possibly others)
- * [HHH-932] - HQL UPDATE and <union-subclass>
- * [HHH-946] - QuerySyntaxException might not be serializable
- * [HHH-964] - ORA-00936 with joined subclass / Oracle
- * [HHH-986] - Need to check Thread.currentThread().getContextClassLoader() in ConfigHelper
- * [HHH-991] - Cannot use comparator class
- * [HHH-1000] - varchar(xxx char) not supported on Oracle8i
-
-** New Feature
- * [HHH-950] - interface for SessionFactory.getCurrentSession() handling
-
-
-** Improvement
- * [HHH-608] - update HSQLDialect for HSQL 1.8 sequence support
- * [HHH-889] - Add read-only cache-mode comment in <query and <sql-query
- * [HHH-898] - OracleDialect UTF8 varchar2
- * [HHH-909] - Onquoted primary key in IncrementGenerator
- * [HHH-988] - generated="never|insert|always"
- * [HHH-989] - add discussion of implicit and explcit joins
- * [HHH-1011] - Make disconnect/reconnect of a Session implicit
-
-** Patch
- * [HHH-994] - Sybase/SQLServer support for temporary tables
-
-
-Changes in version 3.1 beta 3 (13.09.2005)
--------------------------------------------
-** Bug
- * [HHH-528] - component.manyToOne.id in HQL causes join
- * [HHH-871] - Configuration.setListener(String type, Object listener) throws ClassCastException
- * [HHH-873] - referencing raw HQL FromElement alias of update and delete statements
- * [HHH-876] - PreparedStatement being closed before being executed by AbstractBatcher
- * [HHH-884] - SchemaExport does not propagate parent indexes to <union-subclass> tables
- * [HHH-887] - Aggressive release and Session.connection()
- * [HHH-893] - custom tuplizer are not instantiated for components
- * [HHH-905] - $PlaceHolder$ remains in generated SQL when filter is enabled
- * [HHH-907] - optimistic-lock="false" for timestamped object results in SQLException: Invalid column index
- * [HHH-908] - NullPointerException when using BigInteger in a query
- * [HHH-911] - CGLIBLazyInitializer and Exceptions
- * [HHH-913] - NPE in CMTTransaction since javax.transaction.Transaction is never set
- * [HHH-918] - impossible to move objects to another session
- * [HHH-924] - Removed ErrorCodeConverters
- * [HHH-946] - QuerySyntaxException might not be serializable
-
-** Improvement
- * [HHH-898] - OracleDialect UTF8 varchar2
- * [HHH-909] - Unquoted primary key in IncrementGenerator
-
-
-Changes in version 3.1 beta 2 (16.08.2005)
--------------------------------------------
-** Bug
- * [HHH-477] - Boolean discriminators generate invalid SQL for PostgreSQL dialect
- * [HHH-480] - SchemaExportTask ignores some properties not defined in hibernate.properties
- * [HHH-615] - SchemaExport outputFile ignores ant's basedir
- * [HHH-770] - hql query execution generates invalid SQL
- * [HHH-779] - Assertion failure occured with Hibernate 3 saving objects
- * [HHH-781] - SimpleExpression ignorecase regression
- * [HHH-799] - merge() and embedded composite identifiers
- * [HHH-801] - subselect fetch and named parameters
- * [HHH-802] - querying "mapped" composite identifiers
- * [HHH-803] - no version increment from delayed collection adds
- * [HHH-805] - Session.getStatistics().getEntityCount() throws UnsupportedOperationException
- * [HHH-819] - Firebird CONCAT SQL function
- * [HHH-821] - query by natural-id cache is not update when object is inserted or deleted
- * [HHH-822] - <key-property> will actually pick up <type> tags if it were allowed by the DTD
- * [HHH-825] - ReadWrite-Cache issues NullPointerException after modification of an array
- * [HHH-839] - Session.refresh not working for custom 'Load' SQL
- * [HHH-849] - Cartesian product + implicit joins
- * [HHH-854] - Class with mapped composite id can't have subclasses
- * [HHH-858] - Autocommit status inconsistent in connections created by DriverManagerConnectionProvider
- * [HHH-863] - Hibernate generates "notExists" instead of "not exists"
- * [HHH-868] - Missing parens after / or -
-
-** New Feature
- * [HHH-35] - add attribute haltonerror to schemaexport Ant task
- * [HHH-182] - Mimer SQL Dialect for Hibernate 3
- * [HHH-704] - Statistics for optimistic lock failures
- * [HHH-725] - Allow hooks into all executed sql by a session
- * [HHH-783] - collection lazy="extra"
- * [HHH-818] - Optimisitc locking using database current timestamp
- * [HHH-828] - session.getTransaction()
- * [HHH-829] - <cache include="all|non-lazy" ... />
- * [HHH-831] - allow database generated property values
- * [HHH-832] - allow database generated property values for versioning
- * [HHH-838] - Transaction.setTimeout()
- * [HHH-840] - allow definition of "auxiliary" database objects in mapping
- * [HHH-846] - Add Intializable interface for events
- * [HHH-848] - Validate mappings against JDBC metadata
- * [HHH-859] - post-commit events
-
-** Improvement
- * [HHH-133] - schemaexport task: provide independent drop/create output
- * [HHH-135] - parameterized types can't be used on key-property or ir (possible others)
- * [HHH-552] - NoopAccessor for HQL-only properties
- * [HHH-680] - Easier support for doing UserCollectionType's
- * [HHH-686] - Final classes and classes with private null ctors cause unhelpful NullPointerException
- * [HHH-754] - Allow HQL DML for implicit polymorphism
- * [HHH-782] - Avoid unnecessary updates when component property is update='false' but modified
- * [HHH-786] - Improve lazy options for <one-to-one>
- * [HHH-791] - Use cascade styles when fetching entities in refresh() and merge()
- * [HHH-815] - Confusing use of the term "dereference"
- * [HHH-830] - Improvements to caching lazy properties
-
-** Patch
- * [HHH-378] - Better LockMode.UPGRADE for DB2 UDB v8.2
- * [HHH-430] - Improved SizeExpression with greater, lesser, not equals, etc. capabilities
- * [HHH-735] - SchemaUpdate reads table metadata from wrong schema
- * [HHH-780] - org.hibernate.proxy.BasicLazyInitializer reflection hotspot
- * [HHH-864] - Use QUERY_CACHE for sessions with filters to improve performance
-
-
-Changes in version 3.1 beta 1 (21.07.2005)
--------------------------------------------
-
-** Bug
- * [HHH-145] - union-subclass and oracle 8i
- * [HHH-374] - EJB3 example delete query doesn't work in Hibernate.
- * [HHH-447] - EHCache integration prevents multiple session factories
- * [HHH-488] - JACCListeners are not working at all
- * [HHH-564] - missing commas for implicit joins
- * [HHH-577] - joins within subqueries on dbs supporting ansi-joins result in extraneous commas
- * [HHH-592] - cast() function doesn't know its returned Hibernate type
- * [HHH-639] - CGLIB instrumentation of subclasses
- * [HHH-658] - Bug in Alias Name Generation
- * [HHH-671] - Firebird support of sequences/generators
- * [HHH-679] - setLockMode(LockMode.UPGRADE_NOWAIT) does not translate to correct SQL on Oracle
- * [HHH-688] - Bad implementation in org.hibernate.type.CustomType.stringToObject
- * [HHH-691] - generated column alias is incorrect if there is a prior relationship and the table column names are similar to the table name
- * [HHH-694] - NPE when accessing the SLCache stats with TreeCache
- * [HHH-698] - Exception on EG , trying to change immutable id (natural-id)
- * [HHH-699] - Incorrect Tablename genetaion when using MySQL Dialect and no Schema definition
- * [HHH-708] - Restrictions.in could not be used properly on composite-ids
- * [HHH-709] - ArrayType.replaceElements fails if original.length != target.length
- * [HHH-718] - HQL "fetch all properties" not working for column level lazy props
- * [HHH-726] - ConstraintViolationException with primitive collection
- * [HHH-727] - java.lang.StackOverflowError when cascade="true" on both sides of bidirectional one-to-one association using FK
- * [HHH-734] - HQL incorrectly parses certain query strings
- * [HHH-736] - Use of sql functions containing space not supported in filter conditions
- * [HHH-738] - formula property with select-before-update
- * [HHH-747] - Order.toSQLString generates incorrect statement
- * [HHH-748] - component dereferencing in subquery from clauses
- * [HHH-752] - Typo in 8.5.3 bidirectional one-to-one jjoin table example
- * [HHH-757] - NullPointerException when using BigInteger in a query
-
-** New Feature
- * [HHH-595] - HQL insert select
- * [HHH-597] - Named XML resultsetmappings
- * [HHH-696] - handle discriminators on HQL insert
- * [HHH-697] - allow bumping versions in HQL update
- * [HHH-716] - handle version columns in bulk inserts
- * [HHH-723] - Need to be able to pass in javax.sql.DataSource in SF creation
- * [HHH-739] - Order.ignoreCase()
- * [HHH-741] - select clause subselects
- * [HHH-742] - Stateless session
- * [HHH-744] - collection fetching in scroll() via "break processing"
- * [HHH-768] - <many-to-many property-ref=".."/>
-
-** Improvement
- * [HHH-14] - Add Session.delete(String entityName, Object entity)
- * [HHH-295] - cleanup and expose the Tuplizers
- * [HHH-352] - HQL bulk and cache
- * [HHH-689] - exclude parens for components outside where-clause
- * [HHH-743] - {coll.key}, {coll.index}, {coll.element}, etc
- * [HHH-745] - EJB3 composite PK style
- * [HHH-749] - Cascade merge() and unidirectional one-to-many
- * [HHH-750] - use attribute name other than 'type' in dynamic-maps
- * [HHH-753] - Replace antlr System.exit with QueryException
- * [HHH-769] - property-ref="foo.bar" to a component property
- * [HHH-772] - null in maps are handled inconsistently
- * [TODO-18] - optimistic-lock="all|dirty" with components
-
-
-Changes in version 3.1 alpha 1 (24.06.2005)
-------------------------------------
-** Bug
- * [HHH-204] - Wrong/uncommon log name in class ...hql ast ErrorCounter
- * [HHH-241] - HQL lexer doesn't support unicode quoted strings
- * [HHH-354] - property named "full" breaks HQL queries
- * [HHH-493] - WARNING: Keyword 'member' is being intepreted as an ident
- * [HHH-538] - length() function does not work in SQLServerDialect
- * [HHH-539] - ClassCastException on mapping a property with a formula in a set of composite elements
- * [HHH-540] - Mapping a one-to-many collection with a non-null foreign key within a component fails on save
- * [HHH-547] - Cannot commit using UserCollectionType and debug logging
- * [HHH-548] - many-to-many faulty delete optimization when filter in use
- * [HHH-554] - Hibernate 3 HQL to SQL FROM Clause Comma Generation Problem
- * [HHH-558] - HQL doesn't support multi-byte character in class name and property names
- * [HHH-559] - quoted multi-byte character in HQL is translated into weird character in SQL.
- * [HHH-565] - delete-orphan generating AssertionFailure
- * [HHH-566] - The result is not correct in 'createQuery("select new Foor(x,x) from Foo").scroll()'
- * [HHH-570] - size operator fails on a many to many in HQL
- * [HHH-571] - JDK 1.3 Compatibility Issue
- * [HHH-573] - error when merging entity graph has cascade level>2
- * [HHH-575] - org.hibernate.cache.FilterKey is not Serializable
- * [HHH-589] - parameterized expression inside function
- * [HHH-594] - order-by mapping for collections overrides order by in HQL
- * [HHH-601] - New temporary table feature assumes all persisters are ready
- * [HHH-614] - SchemaUpdate broken in DB2/400
- * [HHH-622] - Spelling mistake 'intepreted' in org.hibernate.hql.PARSER warning
- * [HHH-642] - criterias with projection
- * [HHH-650] - FilterImpl is Serializable yet FilterDefinition is not
- * [HHH-657] - Date parse exception using EntityMode.DOM4J
- * [HHH-666] - JTAHelper.isInProgress( txn.getStatus()) throws NPE when txn null
-
-** New Feature
- * [HHH-620] - Extra join conditions in HQL
- * [HHH-640] - short-circuit dirty checking for instrumented classes
- * [HHH-643] - support mutable="false" for collections
- * [HHH-645] - Session.setReadOnly()
- * [HHH-549] - portable to_char() function
- * [HHH-576] - Hook to pre-process generated select strings in the Dialect
- * [HHH-662] - Add support for definition of functional composite key ("properties") in joined subclass
-
-** Improvement
- * [HHH-46] - Allow access to properties that are not joined
- * [HHH-261] - Stored procedure support for SQLServer dialects
- * [HHH-351] - multi-table bulk operations
- * [HHH-574] - improve in naming named-query
- * [HHH-596] - Auto-detect {..} in native SQL queries
- * [HHH-641] - create constraints for many-to-one property-ref
- * [HHH-501] - warn when a final method is tried to be proxied
- * [HHH-525] - cglib related startup performance
- * [HHH-557] - Helpful error message for non Serializable classes with a composite-id
- * [HHH-586] - check immutable natural-ids
- * [HHH-609] - Adds substr to PostgreSQL dialect
- * [HHH-618] - documentation bugs
-
-** Patch
- * [HHH-224] - JDataStore Dialect and updated Testfiles
- * [HHH-366] - InformixDialect SQLExceptionConverter
- * [HHH-536] - ImprovedNamingStrategy modifies capitalized column names inappropriately
- * [HHH-632] - Informix Dialect missing from automatic dialect discovery
- * [HHH-4] - CachedFile bugfix + configuration + autodetect resource as file
-
-
-Changes in version 3.0.5 (25.5.2005)
-------------------------------------
-
-** Bug
- * [HHH-516] - Interceptor.onFlushDirty() sometimes not called
- * [HHH-517] - getDatabaseMajorVersion() not available in JDK 1.3
- * [HHH-518] - SQL parser does not recognize all whitespace
- * [HHH-519] - broken SQL when traversing many-to-many to joined <subselect>
- * [HHH-529] - Bug in merge()
-
-** New Feature
- * added <natural-id> mapping
- * [HHH-533] - allow unique-key on <property> and <many-to-one>
- * [HHH-534] - efficient cache by natural key
- * support for <comment> on MySQL
-
-** Improvement
- * [HHH-526] - log "Aggressively releasing JDBC Connection" as DEBUG instead of INFO
- * various logging improvements
-
-
-Changes in version 3.0.4 (23.5.2005)
-------------------------------------
-
-** Bug
- * [HHH-452] - UnsavedValueFactory.instantiate does not wrap the Exception it catches
- * [HHH-456] - Session still holds references to entities after close()
- * [HHH-457] - Log info for structured second-level cache entries is incorrect
- * [HHH-466] - Made default for MS SQL dialect definition more flexible
- * [HHH-473] - Formula can't contain SQL cast keyword
- * [HHH-484] - Order-by not applied to collections fetched by OuterJoinLoader
- * [HHH-487] - Possible empty union in UnionSubclassEntityPersister
- * [HHH-505] - Possible NullPointerException in BigIntegerType
- * [HHH-507] - Cached List does not show additions
- * Fixed bugs in subselect fetching
-
-** New Feature
- * [HHH-455] - Obtain non-intercepted Session by passing an EmptyInterceptor
- * [HHH-467] - HQL: support for case when then else end IN select clause
- * [HHH-485] - Support multiple collection join fetches (attention: Cartesian product) in native SQL queries
- * Added SessionStatistics metric interface
- * Added support for table and column level <comment> blocks
- * Added Simplified Chinese translation of reference documentation (Xiaogang Cao)
-
-** Improvement
- * Any query may now join fetch >1 collection role (attention: Cartesian product)
- * [HHH-454] - Add 2292 integrityViolationCode to Oracle9Dialect
- * [HHH-503] - Implemented ViolatedConstraintNameExtracter for HSQLDialect (Frank Grimes)
-
-
-Changes in version 3.0.3 (8.5.2005)
------------------------------------
-* fixed bug in HQL for composite key classes which have a property named the same as the owning entity's id property
-* replaced 'connection.aggressive_release' with 'hibernate.connection.release_mode'
-* added ConnectionReleaseMode
-* added eager fetch for any associations with fetch=join, even after a HQL query, or cache retrieval (EJB3)
-* added replicate() isUpdate flag to OnReplicateVisitor, useful for native ids
-* fixed ParameterizedTypes order of initialization
-* fixed bug in DB2Dialect
-* fixed EntityMode.DOM4J creation of duplicate <set> output
-* fixed JDBCException error code handling
-* fixed Criteria Restrictions.isEmpty()/isNotEmpty() when collection is mapped to superclass
-* fixed HQL indexed collections access with no alias
-* fixed HQL aggregate functions on components when "id" property is used
-* fixed issue with non-cascading refresh to collections
-* fixed query-timeout not being applied to bulk HQL (Stephan Fudeus)
-* fixed pessimistic locking with Firebird (Yuichi Sugimura)
-* updated Ant 1.6.3
-* improved validation of sql queries, throw QueryException if addEntity() nor addScalar() was called
-* added automatic dialect detection if no dialect is configured
-* added new tutorial (Michael Gloegl, Christian Bauer)
-
-
-Changes in version 3.0.2 (27.4.2005)
-------------------------------------
-* fixed union operations on PostgreSQL
-* fixed HQL concat() function for Oracle dialect
-* fixed auto-close/auto-flush during getCurrentSession() processing
-* fixed ClassCastException with EntityMode.DOM4J
-* fixed HQL dynamic instantiation with iterate()
-* fixed HQL bug with missing parantheses and implicit joins
-* fixed bug were Interceptor.getEntity() wasn't called if in cache
-* fixed bug in merge() of sorted sets
-* fixed bug in EntityMode.DOM4J with non-lazy embedded many-to-ones
-* fixed Criteria/Projection ordering bug
-* fixed HQL referencing component attribute
-* fixed column duplication detection for components
-* fixed eager fetching for many-to-many associations
-* fixed stack overflow with auto_close_session and aggressive_release and unclosed ScrollableResults/HibernateIterator
-* fixed bug in HQL parser regarding naked property refs which reference component properties
-* fixed bug with eager fetched arrays not being loaded
-* fixed bug in filter against joined-subclass
-* improved CacheMode.GET/IGNORE, disabled cache put
-* improved HQL support for standard SQL functions, including coalesce() and nullif()
-* improved filtering of many-to-many associations
-* added HQL support for cast(x as type) if SQL database supports it
-* added increment id generation for union-subclass
-* added ConnectionProvider.supportsAggressiveRelease() for managed environments
-* added support for caching of queries if filter is enabled
-* added PreparedStatement count to Statistics
-* added transactional/nontransactional read()/get() to Cache API
-* added quotation of schema names
-* added Distinct to Projection API
-* added config parameter 'connection.aggressive_release'
-
-Changes in version 3.0.1 (18.4.2005)
-------------------------------------
-* added HQL tuple constructor/comparison feature
-* added HQL "fetch all properties" override if instrumentation is used for lazy loading
-* added HQL projection feature, return Lists instead of arrays for projection
-* added HQL projection feature, return Maps with user-defined HQL SELECT aliases as keys
-* added HQL support for expressions in aggregation functions
-* added new IntegrityViolationException to MySQL dialect
-* added value mapping type 'big_integer'
-* added not-found="ignore|exception" switch for legacy associations (i.e. broken database integrity)
-* added fully automatic Session scoping in JTA environments with sf.getCurrentSession()
-* fixed bug in DTD that wouldn't allow union-subclass in separate file
-* fixed a MS SQL Server case sensitivity issue with native SQL queries
-* fixed a minor bug in subselect fetching
-* fixed case sensitivity in HQL functions
-* fixed a bug with listener assignment for save() operation (Matthew Inger)
-* fixed return-property in named SQL queries to work with all identifier names
-* fixed TransactionManager lookup (again) for WAS 6.0
-* fixed a bug with HQL batch delete and MS SQL Server
-* fixed session not getting closed with auto_close when rollback occured
-* improved concatentation handling in AST parser
-* updated dom4j to avoid memory leak in old version
-* updated C3P0
-
-
-Changes in version 3.0 (31.3.2005)
-----------------------------------
-* added support for autoflush/autoclose to HibernateServiceMBean
-* fixed initialization/session association detection problem of collections
-* fixed creation of FK constraints to union superclass table
-* fixed bug where union-subclass table did not get a PK constraint
-* added a separate log category for HQL parser warnings and errors
-* fixed bulk delete operation on MS SQL Server
-* added support for proxying protected methods (Juozas)
-* added support for unicode quoted strings in new HQL parser
-* fixed implied joins in subselect WHERE clause in new HQL parser
-* added SQLServer7Dialect to handle differences in functions
-* added support for JNDI-bound cache instances, future use for JBoss Cache
-* added scale attribute to column mappings for numeric precision control
-* added fetch=subselect for collections
-* added support for bulk update/delete against discriminator-based inheritence hierarchies
-* added the ability to use naked property refs in HQL (required in update/delete statements)
-* updated CGLIB 2.1.0
-* fixed NPE at BasicEntityPersister.getPropertyIndex (Todd Nine)
-* fixed issue with entity-name and subclasses (Sverker Abrahamsson)
-* fixed issue with correlated subqueries in new HQL parser
-* fixed a problem with native SQL query mapping and embedded composite identifiers
-* improved mapping binding, allowing unordered extends for pure entity-name hiearchies
-* fixed NPE for delete() with deprecated Lifecycle interface
-* fixed a problem with serial joins ending in component value in new HQL parser
-* fixed inner join/subselect precedence problem in new HQL parser
-* fixed indices() function in new HQL parser
-* fixed a bug in InformixDialect, now correct LIMIT clause
-* fixed a bug in idbag.remove() (Sebastien Cesbron)
-* fixed a conflict on OracleDialect between setMaxResult and LockMode.UPGRADE
-* fixed XML configuration file issue with SchemaExport
-* fixed an ArrayIndexOutOfBounds problem
-* renamed executeUpate() to executeUpdate()
-* fixed batch loading for property-ref entities
-* fixed loading from cache of <key property-ref> collection owner
-* fixed minor bug in SQL exception reporting
-* fixed dynamic-component cannot be bound to XML
-* fixed querying component with formula property
-* fixed incorrect table alias for order-by on many-to-many
-* fixed a bug for unidirectional one-to-many with moving child objects
-* fixed a bug with union-subclasses and persister creation
-* fixed a HQL concatenation problem on MySQL
-* fixed a bug where an unnecessary exception was thrown for a property-ref to a superclass property
-* fixed minor dtd bug
-* fixed new bug in Clob/Blob support
-* fixed issue with INDEX_OP and subclass joins on theta-join dialects
-* fixed some minor issues in query cache regions, including HB-1449
-* fixed superflous import and regression bug in verifyparameters
-* fixed two bugs in select id generator (Malcolm Green)
-* fixed increment generator for union-subclass mappings
-* updated JBoss Cache to 1.2.1alpha, fixing locking issues
-* made stat classes serializable
-* fixed merge(), now ignores blob and clob fields
-* added support/dialect for TimesTen
-* improved algorithm for batch fetching, more aggressive
-* improved toStrings()s for Statistics objects (Ryan Lynch)
-* renamed <result-*> to <return-*> for externalized SQL query mapping
-* renamed Session.openSession() for EntityMode to Session.getSession()
-* added support for CASE in HQL
-* fixed bug with filters and polymorphic queries
-* fixed import ordering problem of super/subclass mappings
-* switched to patched ANTLR 2.7.5, now using context classloader before doing class.forname
-* TableHiloGenerator now falls back to TableGenerator properly with max_lo < 2 (Emmanuel Bernard)
-* better transaction handling of TableGenerator in a JTA environment (Emmanuel Bernard)
-* removed hard coded log4j dependency (Emmanuel Bernard)
-* added support for stored procedure in named queries (Max Andersen)
-* added <property-result> to named SQL queries to allow users to use sql without {}-markup
-* added multi-column property support to native SQL mapping
-
-Changes in version 3.0rc1 (28.2.2005)
-----------------------------------
-* introduced EntityModes, and XML mapping preview
-* several minor dialect improvements
-* fixed a problem where filters were not applied to subclasses
-* fixed a problem where InstrumentTask would fail if applied to already-instrumented classes
-* fixed many problems with new parser and made it the default (thanks again to Joshua for the new parser)
-* implemented bulk update/delete queries for the new parser
-* fixed a minor bug in the classic query parser
-* renamed create() to persist() as per EJB3edr2
-
-Changes in version 3.0 beta 4 (11.2.2005)
------------------------------------------
-* support unidirection one-to-many with a not-null foreign key
-* support formulas for index and element of collections
-* support one-to-ones mapped to formulas
-* fixed a bug in proxying methods that return "this"
-* optimized proxies for embededded composite id classes
-* fixed a bug affecting <key-many-to-one>
-* fixed a bug caching newly inserted objects
-* introduced DetachedCriteria
-* support subselects in Criteria queries
-* miscellaneous Criteria API enhancements
-* fixed a problem where hibernate.max_fetch_depth applied to eager fetching via setFetchMode()
-* use inner joins for join fetching not-null fk associations
-* support unique="true" in <component> and <properties> mappings
-* union-subclass hierarchies may own collections (dtd bug)
-* added guid support for Oracle
-* new mechanism for auto-detecting unsaved-value
-* pass state array in delete events
-* improved implementation of hibernate.auto_close_session and hibernate.close_before_completion
-* fixed a bug where components with only collections would be incorrectly nullified
-* fixed a bug where criteria queries with projection could not be cached
-* fixed a problem where duplicate column name aliases could be generated
-
-Changes in version 3.0 beta 3 (30.1.2005)
-------------------------------------------
-* Major rework of Criteria queries, support for projection, grouping, aggregation, ordering by any attribute
-* various improvements to new HQL parser (Joshua Davis)
-* fixed a bug where <join fetch="select"> was broken for subclasses with duplicated property names
-* fixed problems with long types in Oracle DDL generation
-* added EnhancedUserType, UserCollectionType, UserVersionType
-* added CacheMode
-* fixed minor performance problem where cascade delete could add objects to second-level cache
-* added hibernate.default_batch_fetch_size
-* added hibernate.cache.use_structured_entries
-* different classes and collection roles may now share a cache region
-* don't include discriminators for abstract classes in generated SQL
-* it is no longer truly necessary for composite identifier classes to implement equals()/hashCode() (but still recommended)
-* workaround for bug in MySQL InnoDB with self-referential foreign keys
-* added lazy="true" to many-to-one and one-to-one mappings (requires bytecode instrumentation)
-
-Changes in version 3.0 beta 2 (24.1.2005)
-------------------------------------------
-* added LockAcquisitionErrorCodes to MySQL dialect (Jesse Barnum, Emmanuel Bernard)
-* added MultipleHiLoPerTableGenerator, one hi value per row/per table (compliant with EJB3)
-* added a generator handling multiple hi values per table (Emmanuel Bernard)
-* added events for pre/post SQL operation interception
-* added experimental support for JACC-aware configuration and events
-* added full support for implicit polymorphism in Criteria queries
-* added support annotated classes through XML configuration (Emmanuel Bernard)
-* added support for WebSphere's weird TxManagerLookup
-* added support for filters with dynamic-class mappings
-* added support for lists of parameters in filters
-* added support for scalar queries in createSQLQuery (Michael Gloegl)
-* added support for scalar results in native SQL queries (Michael Gloegl)
-* fixed SchemaExport/SchemaUpdate, now respect default_schema and default_catalog (Michael Gloegl)
-* fixed a bug in one-to-one mapping with property-ref
-* fixed a bug in the query cache lookup routine
-* fixed compilation problems on IBM JDK 1.4. and JDK 1.3.1
-* fixed custom SQL for loading when using composite identifiers
-* fixed exception thrown from optimistic locking failures
-* fixed support for limit queries (select first ?) in Informix
-* improved SchemaExport/Update, now respect default_schema and default_catalog
-* improved dialect handling, throw an exception if no dialect has been set
-* improved loading of mappings, no ordering of super/subclasses required anymore
-* improved statistics for second-level cache
-* improved table generators for hi/lo, can now be used in a JTA environment (Emmanuel Bernard)
-* query engine: added support for 'trim([leading | trailing | both] [expression from] expression)'
-* query engine: added support for DISTINCT and ALL
-* query engine: added support for FETCH
-* query engine: added support for HAVING count()
-* query engine: added support for HQL NOT IN and EJBQL '[NOT] MEMBER OF'
-* query engine: added support for ORDER BY COUNT(*)
-* query engine: added support for collections of scalar values
-* query engine: added support for literals in constructor select expressions.
-* query engine: added support for select elements(..) from Foo f
-* query engine: added support for template functions in the SELECT clause
-* query engine: fixed NOT LIKE
-* query engine: introduced EMPTY and added it to constant (support for IS [NOT] EMPTY)
-* updated dom4j, OSCache, EHCache, JBoss Cache, Xerces, Xalan, and Log4j
-* associated class where filter now applies to <one-to-one property-ref>
-
-Changes in version 3.0 beta 1 (21.12.2004)
-------------------------------------------
-* reimplemented HQL using an ANTLR-based AST parser (Joshua Davis)
-* added class="select" id generator
-* added Query.setReadOnly()
-* added hibernate.order_updates
-* introduced cascade refresh
-* added typed JDBC exceptions (Steve Ebersole)
-* improved lifecycle for CacheProviders (Steve Ebersole)
-* added Expression.isEmpty()
-* fixed some minor mapping DTD bugs (Ben Sommerville)
-* fixed auto-commit mode for SchemaUpdate
-* added default-lazy to <hibernate-mapping>, which defaults to true!
-* added fetch="join|select" and deprecated outer-join attribute
-* fixed a bug where <custom-insert> was not used for entities with "identity" id generation
-* fixed some problems with dynamic-class
-* added property-level optimistic-lock attribute, to allow an unchecked property
-* cascade lock() now cascades with LockMode.NONE
-* fixed some bugs in filter handling (Steve Ebersole)
-* added hibernate.transaction.flush_before_completion and hibernate.transaction.auto_flush_session
-* added JSR-220 compliant create() and merge() operations
-* cascade attribute is now multi-valued, with values save-update,create,merge,delete,delete-orphan,lock,evict,replicate,all-delete-orphan
-* index and unique-key attributes may now be multi-valued
-* introduced unsaved-value="undefined", the default for "assigned" ids and <composite-id>, which forces Hibernate to hit the db
-* primitive typed <id> property mappings now default to unsaved-value="0"
-* added ScrollMode
-* added dialect for Derby (Simon Johnston)
-* added MySQLMyISAMDialect and MySQLInnoDBDialect
-* added precision and scale mapping attributes, for numeric types in DDL
-* fixed a problem with duplicate column mappings on Sybase
-* read-write cache now uses version numbers to ensure consistency with database, if available
-* native SQL queries may now fetch a collection role (Steve Ebersole)
-* added sequential-select, optional and inverse attributes to <join/>
-* added <properties> element, which can be the target of a property-ref
-* fixed a bug relating to composite property-refs
-* Hibernate now much more robust if user does not implement equals()/hashCode() on id and unique key classes
-* enabled batch deletes for versioned data
-* fixed a minor bug in Session.close()
-* removed uuid.string and renamed uuid.hex to plain uuid
-* workaround for a MySQL bug in SchemaUpdate
-* added JDBCException.getSQL() and made various improvements to exception flow
-* createSQLQuery() now fully supports components
-* fixed a bug in SQL generation for <joined-subclass> mappings
-* fixed a bug where filter and query parameters could be bound in the wrong order (Steve Ebersole)
-* fixed a problem where quantifiers could not appear in SQL fragments
-* fixed a bug with dynamic components
-* fixed a bug where Dialect default properties overrode user-specified properties (Ben Sommerville)
-* fixed a bug where duplicate column name in a joined table caused an exception
-* implemented two-phase load for dynamic components
-* fixed a bug where cancelQuery() canceled a re-pooled statement
-* deleted collections are now removed from session-level cache
-* fixed a bug in LocaleType (Steve Ebersole)
-* use "with rr" to obtain UPGRADE locks in DB2
-* package attribute now significant for extends
-* fixed a minor problem with Hibernate Clobs and Blobs
-* extends attribute does no longer require specific ordering of mapping files
-
-Changes in version 3.0 alpha (23.8.2004)
-----------------------------------------
-* package rename net.sf.hibernate -> org.hibernate
-* checked exceptions are now runtime exceptions
-* some session methods deprecated and moved to org.hibernate.classic.Session
-* removed various deprecated functionality
-* added Filter API and mappings, for temporal, regional and permissioned data (Steve Ebersole, Gavin King)
-* support cascade delete via ON DELETE CASCADE constraint
-* added extra attributes to named query definition
-* added hibernate.use_identifier_rollback
-* added subselect mappings
-* added lazy="true" to property mappings
-* added <join/> for multitable mappings
-* added <union-subclass/> for table-per-concrete-class strategy
-* added Statistics API and JMX MBean (Gavin King, Emmanuel Bernard)
-* introduced new event-driven design (Steve Ebersole)
-* support for faster startup with Configuration.addCachableFile() (Joris Verschoor, Max Andersen)
-* mask connection password for log level greater of equals to info (Joris Verschoor, Emmanuel Bernard)
-* add check of named queries when building SessionFactory (Joris Verschoor, Emmanuel Bernard)
-* added custom EntityResolver setting capability (Emmanuel Ligne, Emmanuel Bernard)
-* PropertyValueException for null values in not-null properties of components (Emmanuel Bernard)
-* enhanced support for single- and no-argument sql-functions in HQL select clause (Michael Gloegl)
-* Added catalog element, to enable table names like catalog.schema.table (Michael Gloegl)
-* Added <sql-insert>, <sql-update> and <sql-delete> support (Max Andersen)
-* Support callable statements (stored procedures/functions) via callable="true" on custom sql (Max Andersen)
-* Added support for type parameters and typedefs (Michael Gloegl)
-* Added support for JDBC escape sequences in createSQLQuery (Max Andersen)
-* Added statistics per SessionFactory (Gavin King, Emmanuel Bernard)
-* Added a StatisticsService MBean for JMX publucation (Emmanuel Bernard)
-* support for updates via rownum in Oracle
-* fixed problems with SchemaUpdate
-* support for <column formula="..."/>
-* added hibernate.use_sql_comments
-* added property-ref to collection <key/>
-* fixed performance problems with <one-to-one property-ref=.../>
-* enhanced UserType with new methods assemble()/disassemble()
-* better algorithm for batch fetch batch sizes
-* added <dynamic-class>
-* added entity-name concept, and session methods save(entityName, object), update(entityName, object), etc
-* added framework in proxy package
-* native SQL queries may now fetch a collection role
-* added <loader/> for class and collection mappings
-* added getEntity() and getEntityName() to Interceptor
-* formula-based discriminators and association mappings
-* added "guid" id generation strategy
-* various improvements to dialects
-* <discriminator force="true"/> now acts as a filter on collections
-* where filters now apply in the on clause in an outer join
-* added hibernate.jdbc.factory_class to select a custom batcher
-* session now uses entity name + id to enforce uniqueness, instead of table name + id
-
-Changes in version 2.1.6 (9.8.2004)
-------------------------------------
-* fixed Quickstart/readme.txt instructions
-* fixed DB2/400 identity column support
-* fixed the scroll() query method
-* fixed exotic classloader problems with CGLIB
-* added insert="false" for discriminator columns which are part of a composite identifier
-* added several new configuration settings to JMX HibernateService
-* added new instantiate() method to SessionFactory.getClassMetadata()
-* improved the HSQL DB dialect with features from new version
-* added hibernate.jdbc.batch_versioned_data (Steve Ebersole)
-
-Changes in version 2.1.4 (2.6.2004)
-------------------------------------
-* improved Session serialization support by adding ability to serialize unflushed sessions (Steve Ebersole)
-* fixed Session.clear() functionality to clear the internal nonExists cache (Steve Ebersole)
-* much better implementation of scroll() (Steve Ebersole)
-* support "select new ..." for iterate() and scroll() (Steve Ebersole)
-* added support for multi-parameter SQL functions (Steve Ebersole)
-* fixed hbm2ddl generating infinite indexes on MySQL (Michael Gloegl)
-* fixed alias precedence in HQL queries, function names are second (Steve Ebersole)
-* added "transactional" as allowed cache concurrency strategy in XML configuration file
-* improved System.getProperties() with security exception warning in secure environments
-* improved Proxool integration, better property handling
-* fixed problem with use of getDefinedMethod() in secure environments (Ken Arnold)
-* fixed bug in createSQLQuery() which prohibited multiple aliases for the same entity (Max Andersen)
-* fixed query cache misses when using named bind parameters (Michael Greer)
-* recognize "left" and "right as keywords in SQL fragments
-* recognize SQL quoted identifiers in SQL fragments
-* improved identity handling on SQL Server by using scope_identity() for update counts (Arthur Fitt)
-* added DB2390Dialect for DB2/390 databases (Kristoffer Dyrkorn)
-* fixed a bug in toArray() of identifier bag collections (Khachchou Mohammed)
-* fixed a problem with DDL generation for serial columns in Informix
-* fixed a problem with DDL generation for timestamp columns in Informix (Michael Schmidt)
-* fixed a NPE that occurred calling saveOrUpdateCopy() for components
-* fixed a bug with replicate() and uninitialized collections
-* fixed a bug caching one-to-one associations
-* fixed eviction from named query cache regions
-
-Changes in version 2.1.3 (25.4.2004)
------------------------------------
-* added SELECT-clause SQL function support to main Dialects
-* fixed a problem where some unnecessary selects where issued for optional one-to-one associations
-* fixed a bug in SQL generation for criteria queries with multiple one-to-many joins
-* deprecated everything related to PersistentEnum
-* fixed an NPE that occurred when using <one-to-one property-ref> with composite ids
-* fixed a problem with JCA adaptor on WebLogic (Michael Gloegl)
-* improved behavior when removing elements from <idbag>s
-* fixed a bug in getGeneratedKeys() support (Michael Gloegl, Kevin Day)
-* fixed a bug when using Criteria queries with collections of joined-subclasses
-* fixed an NPE that occurred when calling comparator() on a lazy sorted set (Attila Szegedi)
-* fixed a bug when using setMaxResults() with native SQL queries in some Dialects
-* validate that composite id classes override hashCode() (Adrien)
-* fixed some minor problems with saveOrUpdateCopy()
-* fixed some problems in OSCache provider
-* fixed an NPE that occurred when calling a lazy collection after evicting from session
-* fixed an NPE that occurred when select-before-update is used with unversioned data (Patrick Peralta)
-* fixed a bug where dynamic-components could not be queried (Massimo Ferrari)
-* SQL formula parser now recognizes all Dialect-specific SQL functions (Anthony Patricio)
-* fixed a problem where SQL CASE statements could not appear in SQL formulas
-* fixed a problem where subselects with joins could not appear in SQL formulas
-* C3P0 and Proxool pools now cleaned up after SessionFactory.close()
-* fixed a bug where dirty checking of mutable properties was broken after lock()
-* fixed a minor bug where orphan delete was broken for newly saved instances
-* added Query.setFetchSize() and Criteria.setFetchSize()
-* PreparedStatement pooling in DBCPConnectionProvider can now be disabled (Emmanuel Bernard)
-* Query.setProperties(Object) now detects array and collection valued properties and delegates to Query.setParameterList() (Max Andersen, Nick Heudecker)
-* lengths of positional parameters and types arrays are now validated
-* fixed an obscure problem where a PreparedStatement was not closed
-
-Changes in version 2.1.2 (4.2.2004)
------------------------------------
-* added Session.isDirty()
-* fixed a very obscure concurrency problem with read-write cache for inverse collections
-* deprecated Criteria.returnMaps() / Criteria.returnRootEntities() in favor of new ResultTransformer framework
-* don't cache objects with dynamic-update="true" or <joined-subclass> mappings immediately after insert/update
-* added version checking to saveOrUpdateCopy()
-* fixed constraint violations that occurred when mixing identity columns with other id generation strategies
-* added Sybase 11.9.2 dialect to support older versions of Sybase that do not support ANSI joins (Colm O' Flaherty)
-* added Informix9Dialect (Finn McCann and Max Andersen)
-* added DB2400Dialect (Peter DeGregorio)
-* fixed a problem where mapping validation failure was reported as duplicate import (Michael Gloegl)
-* fixed a problem with Expression.not() in MySQL (Michael Gloegl)
-* added support for ResultSet.getGeneratedKeys() (David Morris, John Kristian)
-* added check attribute to allow check constraints in DDL
-* implicit polymorphism for Criteria queries (Shorn Tolley)
-* use IF EXISTS for dropping hilo tables (Michael Gloegl)
-* better exception report if deleted object is resaved by cascade
-* support nested components in Example queries (Emmanuel Bernard)
-* fixed a minor problem with onDelete() callbacks
-* fixed an obscure problem with select-before-update
-* added SunONETransactionManagerLookup (Robert Davidson)
-* fixed a problem with replicate() and <joined-subclass> mappings
-* made setParameterList() accept empty lists and deny null values (Max Andersen)
-* validation check on query parameters now allows setParameter(x, null) (Max Andersen)
-* added default-access to DTD (Max Andersen)
-* made Query.setParameterList() accept empty lists and deny null values (Max Andersen)
-* allow Query.setParameter(x, null) (Max Andersen)
-* queries with "select new" now cacheable
-* throw meaningful exception when lazy initialization occurs on disconnected session
-* added default-access to <hibernate-mapping> (Max Andersen)
-* added -text support to SchemaUpdate (Max Andersen, Matt Hall)
-* fixed broken implementation of embedded composite keys with createSQLQuery() (Max Andersen)
-* added hibernate.cache.use_minimal_puts config property to reduce unnecessary second-level cache puts
-* optimized performance of orphan delete detection (Bertrand Renuart)
-* fixed problem where unnecessary UPDATE occurred after INSERT for versioned objects with collections
-* WebSphereTransactionManagerLookup for WAS 5.1 (Edina Pimp)
-* Criteria queries now cacheable (Mario Ivankovits)
-* fixed problem with ordered, paginated queries in DB2 (Tim Collins)
-* fixed a bug caching <idbag>s
-* lazy="true" collections are now lazy even when available in cache
-* fixed a problem with version unsaved-value="negative"
-* added hibernate.cache.region_prefix config property (William Drai)
-* fixed problem where configuration input streams were not closed (Rajesh Patel)
-
-Changes in version 2.1.1 (17.12.2003)
--------------------------------------
-* added optional package attribute to <hibernate-mapping>
-* added <meta-value> element to allow simpler <any> mapping
-* native SQL queries are now cacheable - added <synchronize> element to allow correct result set expiry
-* fixed a bug in CGLIB2 integration (Chris Nockleberg)
-* added NamingStrategy
-* don't cache objects with formula properties immediately after insert/update
-* log generated SQL to a special category
-* type of property with access="field" may now be guessed using reflection
-
-Changes in version 2.1 final (12.12.2003)
------------------------------------------
-* fixed a problem with CGLIB2 proxies and method calls inside constructors
-* fixed a bug running SchemaExportTask with mappings in jar files (Tom McCune)
-* allow custom persister declaration for subclasses (Nick Johnson)
-* fixed handling of sequences in SchemaUpdate on Oracle (Andrew Delpha)
-* fixed a bug where Iterator did not handle single null values correctly
-* detect and throw exception in the case of a duplicate property mapping
-* don't auto-create indexes for collection foreign keys (roll back to 2.0.x)
-
-Changes in version 2.1 rc1 (29.11.2003)
----------------------------------------
-* long identifier and discriminator column names are now safely aliased (Max Andersen)
-* cleaned up mapping package to allow applications to manipulate metamodel programmatically
-* fixed a recent bug where collection sort order was lost in second-level cache
-* formula attribute now supported for joined-subclass mappings
-* formula properties may now be used anywhere in queries
-* dialect-specific query pagination for SQL Server
-* fixed a bug where a long path expression ending in collection access by index missed some tables in SQL FROM clause
-* fixed a very ancient performance problem where null one-to-one associations caused n+1 selects
-* added Session.saveOrUpdateCopy()
-* fixed some bugs in Example queries
-* fixed some minor bugs in dialect-specific query pagination
-* immutable entity passed to update() is now lock()ed instead
-* reworked the semantics of nonstrict-read-write
-* JCS cache support now deprecated
-* fixed some obscure bugs in collection handling
-* migrated to CGLIB2 (thanks to Chris Nockleberg)
-* fixed bugs in replicate()
-* fixed a bug affecting joined-subclass mappings with dynamic-update=true
-* performance improvements to boolean type mappings (Bertrand Renuart)
-* integrated JBoss TreeCache clustered cache (thanks to Bela Ban and Ben Wang)
-* fixed a bug in new query parameter validation (Steve Ebersole)
-* fixed a bug where <any> mappings caused unnecessary ObjectDeletedException at flush time
-* fixed a bug where associations with property-ref mappings were not properly cached
-* throw PropertyValueException when not-null properties are null at flush time
-* added unsaved-value attribute to version property mapping (Emmanuel Bernard)
-* tolerate classnames containing $ (Steve Ebersole)
-
-Changes in version 2.1 beta 6 (5.11.2003)
------------------------------------------
-* added Session.cancelQuery()
-* improvements to transaction handling for failed commit (thanks to Juergen Hoeller)
-* added cascade="delete-orphan"
-* fixed an exception that occurred when a property was declared not-null="true" update="false" (thanks to John Kristian)
-* support multiple named query cache regions (Mikheil Kapanadze)
-* some improvements to collection reattachment
-* fixed a bad bug with adds to an uninitialized bag or list
-* removed support for <dynabean/> components
-* added <dynamic-component/> mapping for properties of type Map
-* fixed a bug where schema export generated index names that were too long for DB2
-* allow per-region expiry policies in OSCache (Matthias Bogaert)
-* fixed a stack overflow that could occur while initializing nonlazy collections
-* fixed a bug in case-insensitive like for Example queries
-* fixed a bug in ScrollableResults.setRowNumber() (Martin Priekopa)
-* improvements to the cache concurrency strategies
-
-Changes in version 2.1 beta 5 (30.10.2003)
-------------------------------------------
-* Support for custom CollectionPersister (Nick Johnson, Max Andersen)
-* Support for named SQL queries (Max Andersen)
-* duplicate named queries now throws MappingException instead of just logging warning (Max Andersen)
-* fixed problems with WebSphereTransactionManagerLookup (Ralf Taugerbeck, Daniel Bradby)
-* added support for custom collection persisters (thanks to Max Anderson, Nick Johnson)
-* fixed a performance problem during query compilation (Bulent Erdemir)
-* composite keys now supported in createSQLQuery() (Max Andersen)
-* fixed JCA adaptor to run in WebLogic (Daniel Bradby)
-* integrated SwarmCache (Jason Carreira)
-* integrated OSCache (Matthias Bogaert)
-* fixed an NPE that could occur with lists and orphan delete
-* allow nullable one-to-one with property-ref
-* improved usage of Dialect-specific limit SQL
-* fixed problem where non-lazy collections held by cached objects were not immediately initialized
-* fixed getReturnTypes() for native SQL queries (Max Andersen)
-* fixed problems with Criterions that applied to multi-column properties
-* check of rowcounts when JDBC batch updates enabled
-* added named SQL queries using <sql-query> element (Max Andersen)
-* added some extra validations so Hibernate fails earlier when user makes mistakes
-* allow lazy="true" as an alternative to proxy="ClassName"
-* removed dependency to commons-lang
-* SchemaExport now creates indexes for collection foreign key columns if specified by Dialect
-* fixed a bug parsing named parameters in setParameterList()
-* select new Foo(...) will now tolerate null values if the constructor accepts a wrapper type
-* fixed a problem detecting Proxool
-* added logging of persistent object states during flush()
-* allow "not null" as a discriminator value
-* added "parameters" config param to "sequence" generator (Matthias Bogaert)
-
-Changes in version 2.1 beta 4 (3.10.2003)
------------------------------------------
-* fixed a bug where <any> mappings did not handle proxies correctly
-* implemented new optimistic-lock strategies
-* fixed several bugs in Criteria query API
-* fixed a bug caching property-ref associations
-* improvements to XML Databinder (Ara Abrahamian)
-* added Session.replicate() and ReplicationMode
-* added ScrollableResults.setRowNumber() / ScrollableResults.getRowNumber()
-* added query cache and Query.setCacheable()
-* added Criteria.returnMaps()
-* fixed some problems with CGLIB proxies
-* fixed an NPE that occurred when a joined-subclass of a versioned entity defined only collections
-* added the access attribute, direct field access and the PropertyAccessor extension point
-* added MatchMode for use with Criteria queries (thanks to Michael Gloegl)
-* fixed a bug where some lazy="false" collections were not immediately initialized
-* fixed problem with WebSphere 5 TransactionManager
-* support schema attribute in MySQL, by using an underscore in the table name (Chris Hane)
-* now seperate Dialects for Interbase and Firebird (Reha Cenani, Max Andersen)
-* removed built-in PreparedStatement cache
-* added Session.getSessionFactory()
-* fixed problem with native SQL queries and Query.setProperties() (Max Andersen)
-* Query now fully validates parameters against the query string before passing them to JDBC (Max Andersen)
-* fixed an NPE in SessionFactory.close()
-* fixed an NPE that occurred when using <idbag>s
-* added SQL-level query results paging to DB2Dialect
-* "foreign" id generator now handles detached instances
-
-Changes in version 2.1 beta 3 (7.9.2003)
-----------------------------------------
-* added Example queries
-* fixed an exception that occurred at startup with <key-many-to-one> and <joined-subclass>
-* fixed a bug where composite-elements were not being updated if a property not in the equals() was changed
-* <parent> property of a composite-element may now be used in equals()
-* named parameters may now be used in HQL order by clause
-* null value of version property now indicates unsaved instance
-* added select-before-update attribute
-* two-phase loading now use for components
-* better implementation of equals()/hashCode() for proxies
-* added property-ref attribute to <many-to-one>
-* renamed result() to uniqueResult()
-* added Session.get()
-* added HashtableCacheProvider
-* JTA TransactionManager now used even when not using Hibernate Transaction API
-* always bypass process-level cache for LockMode.READ
-
-Changes in version 2.1 beta 2 (27.8.2003)
------------------------------------------
-* <subclass> and <joined-subclass> may now appear outside of a <class> element, by providing the extends attribute (Max Andersen)
-* fixed an NPE at startup that was introduced in beta 1
-* fixed a bug in Map.putAll()
-* new pluggable cache API
-- deprecated <jcs-cache> in favor of <cache>
-- net.sf.hibernate.cache.CacheProvider settable via hibernate.cache.provider_class
-* more aggressive caching
-* added Hibernate.close(Iterator)
-* Criteria queries may now include joins
-- Criteria.addJoin()
-- Criteria.createCriteria()
-* hibernate.transaction.manager_lookup_class should now ALWAYS be specified in JTA environment when using jcs caching
-* fixed a bug caching <key-many-to-one>
-* fixed bug where cached component did not get <parent> property populated
-* added hibernate.max_fetch_depth property
-* smarter outer-join fetching
-* transient object may now be associated with session using Session.lock()
-* added Query.result(), Criteria.result()
-
-Changes in version 2.1 beta 1 (10.8.2003)
------------------------------------------
-* batch-size attribute for collection and class mappings, to allow batch loading
-* collections of "value types" (including composite-elements) may now appear in HQL from clause
-* more efficient loading of collections, and better handling of non-lazy collections
-* added HQL index() function to allow access to collection element index
-* added Session.createSQLQuery() (Max Andersen)
-* added outer-join attribute to collection mappings
-* Criteria.setFetchMode() now applies to collection-valued path expressions
-* added property-ref attribute to <one-to-one>, enabling unique foreign key associations
-* added hibernate.max_fetch_depth config property
-* added hibernate.hbm2ddl.auto config property
-* fixed a bug with combination of <jcs-cache> and <key-many-to-one>
-* support for Dialect-specific SQL functions in HQL select clause (David Channon)
-* added Session.clear()
-
-Changes in version 2.0.2 (2.8.2003)
------------------------------------
-* subqueries may now use HAVING and GROUP BY clauses
-* fixed a bug with setMaxResults(), setFirstResult() in HSQL (introduced in 2.0.1)
-* fixed a bug in Set.removeAll()
-* fixed a bug in SchemaUpdate (Mathias Bogaert)
-* added weak typing functionality to ScrollableResults
-* fixed a bug with "calendar" versioning in IBM JDK1.3.1 (workaround for JDK bug)
-* fixed a bug in mapping DTD that caused a problem for hbm2java (Max Andersen)
-* fixed a bug querying nested components
-* SQL generation now prefers ANSI-style inner joins to theta inner joins
-* fixed a bug caching collection references loaded using FETCH
-* fixed a bug with composite foreign keys in normalized table mappings (Tom Sedge)
-* limit support for Interbase (Ludovic Orban)
-* added where attribute to <class> mappings
-* added cascade="all-delete-orphan" for collection mappings
-* fixed a bug binding named parameters with setMaxResults()/setFirstResults()
-* fixed some minor bugs in HQL translator
-* fixed a long-standing bug where a <key-many-to-one> could not be dereferenced in HQL
-* SQL UPDATEs now occur in a predictable order (same order as objects were loaded)
-* support for SELECT ... FOR UPDATE in SAPDB
-* fixed bug where Criteria queries against a subclass also returned superclass instances
-* fixed a very rare bug where an update could get lost with normalized mappings
-* fixed a problem with proxied class heirarchies rooted at an interface or abstract class
-* where and order-by attributes now allow SQL function calls and subselects
-* added formula attribute to <property> tag, to allow "computed" properties
-* fixed a bug where PreparedStatements were sometimes not closed when an exception occured
-* workaround for a problem with <joined-subclass> and Interceptor.onFlushDirty()
-
-Changes in version 2.0.1 (17.6.2003)
-------------------------------------
-* fixed some problems with new dialect-specific LIMIT clauses
-* improved parsing of collection where attribute
-* made one-to-many bags more efficient (they are really sets!)
-* allowed type="calendar" for <version> properties
-* fixed a bug with locking a versioned composite-id class
-* refresh() may now take a transient instance
-* added ProxoolConnectionProvider (Martin Crawford)
-* fixed some minor JCA issues (Mike Mosiewicz)
-* fixed a bug with FETCH and sorted associations
-* improved performance of SchemaUpdate tool (Teodor Danciu)
-* fixed a bug in Configuration.addFile(String) (Ken Geis)
-* tidied up and documented hbm2ddl package (esp. Ant tasks)
-* deprecated CounterGenerator in favor of IncrementGenerator
-* improved logging during initialization
-* deprecated "vm" in favor of "increment" id generator
-
-Changes in version 2.0 final (8.6.2003)
----------------------------------------
-* added "fetch" keyword to HQL
-* added evict() methods to SessionFactory for JVM-level cache
-* destroy caches from SessionFactory.close()
-* fixed an NPE in Session.evict() (Simon Spero)
-* added Query.setLockMode()
-* tidied up implementation of Loader
-* release ResultSets more aggressively
-* miscellaneous improvements to some Dialects
-* hbm2java now honors the sort attribute (Max Andersen)
-* added exceptions to Interceptor interface
-* fixed problem with setMaxResults(), setFirstResult() in Oracle (introduced in beta 6)
-* fixed some SQL generation that was a problem for Sybase (Dietmar Posselt)
-* fixed some problems with ODMG API (Oliver Gries)
-* added JOTMTransactionManagerLookup (Low Heng Sin)
-* added JOnASTransactionManagerLookup (?)
-* fixed a bug in WeblogicTransactionManagerLookup (Mathias Bogaert)
-* added Criteria.setFetchMode()
-* added new Expressions
-* much more elegant/robust handling of quoted identifiers
-* renamed Hibernate.association() to Hibernate.entity()
-* added dynamic-update and dynamic-insert mapping attributes
-* fixed a bug with refresh() of objects with collections
-* HQL aliases now optional - "from Cat" now legal
-* platform-independant quoting of identifiers using backticks
-
-Changes in version 2.0 beta 6 (10.5.2003)
------------------------------------------
-* fixed a bug querying one-to-many associations to a <joined-subclass>
-* added support for dialect-specific LIMIT-style clauses (David White)
-* added <idbag>
-* fixed bug in hashCode() of persistent collections
-* <joined-subclass> now supported in HSQL (Wolfgang Jung)
-* fixed problem for XML parsers which ignore default values declared in DTD
-* <meta> tags can now be set to not be inheritable
-* fixed bug in Expression.in()
-* fixed an NPE that could occur from update() in very strange cases (Chris Nockleberg)
-* disabled outer-join back to owner when initializing one-to-many (performance improvement)
-* fixed a bug in Query.setParameterList() (Nick Heudecker)
-* improved JCA support (Igor Fedorenko)
-
-Changes in version 2.0 beta 5 (21.4.2003)
------------------------------------------
-* Informix support (Steve Molitor)
-* fixed a bug parsing "select new ... " queries
-* deprecated "object" type in favor of <any> mappings
-* added Session.contains()
-* added extra DBCP config options (Alex Burgel)
-* SessionFactory.close() now unbinds from JNDI
-* added Session.evict()
-* got rid of an unnecessary SQL DELETE issued when an empty collection was dereferenced
-* where attribute of collection mappings no longer ignored for deletion
-* improved logging
-* support polymorphic associations to "embedded" composite id classes
-* various bugfixes to collection filter parameter binding
-* fixed some problems with proxies introduced in earlier beta versions
-* fixed bug with self-reference in the case of identity column id generation
-* added hibernate.cglib.use_reflection_optimizer property
-* added nonstrict-read-write cache
-* fixed an SQL-generation bug in new Criteria API
-* added CompositeUserType
-* sequence and table id generators now aware of default-schema
-* added update and insert attributes to <component> element
-* fixed a bug with expressions like elements(foo.bar.baz) in where clause
-* more efficient Set initialization (two-phase load)
-* removed support for hibernate.query.imports and added <import> mapping element
-* fixed problem in DBCP connection validation and added new config properties
-* hbm2java can now generate finder methods for persistent objects (experimental) (Matt Hall)
-* hbm2java small fixes/refactorings to support generating more than one file per persistent object (Max Andersen)
-
-Changes in version 2.0 beta 4 (22.3.2003)
------------------------------------------
-* Major HQL improvements
-- from "Foo as foo join foo.bars as bar" instead of "from foo in class Foo, bar in elements(foo.bars)"
-- "select new Foo(bar.name, bar.amount) from ...."
-- outer and full join support
-* Query methods now return this, to allow chaining
-* FrontBase support (Run Lussier)
-* experimental JCA support (Daniel Bradby)
-* hbm2java now can generate Beans style property events (Klaus Zimmermann)
-* support SQL identifiers quoted with []
-* fixed bug with PostgreSQL
-* name attribute now optional in .cfg.xml
-* support for postgres ilike operator (M Lang)
-* squash warnings with GNU JAXP (Chris Nockleberg)
-* fixed a bug in Query.setParameterList()
-* Ingres support (Ian Booth)
-* collections now detect changes not made via wrapper for newly saved objects
-* new (experimental) Criteria + Expression APIs
-* Query.setEntity(), etc, now aware of proxies (also improved hueristics for guessing Type)
-* added Hibernate.isInitialized()
-* detect changes made directly to newly-wrapped collection (ie. not via the wrapper)
-* added Hibernate.refresh(Object, LockMode)
-* update(), saveOrUpdate() no longer initialize a proxy
-* fixed problems with Sybase
-* added force attribute to <discriminator>
-* improved handling of null discriminator-value
-* support SQL-style '' escape for HQL strings
-
-Changes in version 2.0 beta 3 (24.2.2003)
-----------------------------------------
-* collections now represent null elements as a missing row
-* collections now deserialize correctly (fix for bug in beta 2)
-* standardised on dom4j for XML parsing
-* fixed bugs in collection caching (an exception occurred for some sorted collections and some kinds of maps)
-* allowed null discriminators
-* set autocommit to true in SchemaUpdate
-* fixed a stack overflow that could occur in toString() of classes created with hbm2java (Max Andersen)
-* fixed a bug where composite-element <parent> property was not being set after retrieval from cache
-* added where attribute to collection mappings to allow filtering
-* fixed a exception that occurred when wrapping collections with sort="MyComparator" (Jason Horne)
-* objects with mutable="false" are now never updated
-* fixed an exception that occurs with <key-many-to-one> association to a class with a composite id (Stefano Travelli)
-* added SchemaExport Ant task (Rong C Ou)
-* integrated latest CGLIB release (Juozas Baliuka)
-- added support for new CGLIB reflection optimizer (Juozas Baliuka)
-* improved query cache algorithm (Who?)
-* fixed a bug in "object" type
-* Lists and arrays now represent null elements as a missing row
-* fixed a bug in Hibernate PreparedStatement cache where maxRows and fetchSize were not cleared before re-caching
-* fixed a bug in HibernateService that caused a restart to fail
-* added SybaseAnywhereDialect (?)
-* added SessionFactory.close()
-
-Changes in version 2.0 beta 2 (2.2.2003)
-----------------------------------------
-* property column names may now be of any length (Mark Woon)
-* fixed problem where CodeGenerator created private get/set pairs (Max Andersen)
-* fixed all silly bugs in Configuration.configure()
-* efficient collection updates from Session.update()
-* added <jcs-class-cache> and <jcs-collection-cache> elements to hibernate-configuration.dtd
-* support for normalized mappings for databases with DECODE instead of CASE (Simon Harris)
-* added Oracle9Dialect
-* added JRun4TransactionManagerLookup (Joseph Bissen)
-* fixed JDBCException to keep reference to underlying SQLException
-* fixed a bug loading many-to-many associations with a repeated column name
-* fixed a bug in ShortType
-* added IngresDialect (Ian Booth)
-* added --config option to SchemaExport
-
-Changed in version 2.0 beta 1 (28.1.2003)
------------------------------------------
-* renamed packages to net.sf.hibernate.*
-* all API methods now wrap SQLExceptions
-* removed support for toplevel collections / subcollections
-* created hibernate-mapping-2.0.dtd
-- renamed 'readonly' attribute to 'inverse'
-- renamed 'role' attribute to 'name'
-- changed default value for 'unsaved-value' to "null"
-- added mandatory 'name' attribute to <param>
-- added <meta> tag
-* created hibernate-configuration-2.0.dtd
-* brand new Configuration API, including exposed mapping package
-* completely reworked IdentifierGenerator framework
-- built-in generators now auto-detect the type (so integer identity columns are supported, for example)
-- parameters are now named
-- built-in strategies are renamed
-* expanded Interceptor interface
-* removed exceptions that occur if an object is saved or deleted multiple times in a session
-* added <parent> subelement to <composite-element> and <nested-composite-element>
-* collections except for <bag>s now implement by-value equals() and hashCode()
-* removed all deprecated methods
-* added Session.refresh()
-* added dynamic-update functionality
-* added update and insert attributes to <property> and <many-to-one> mappings
-* added elements(), indices(), size(), maxelement(), minelement(), maxindex(), minindex() collection functions to query language
-* huge improvements to CodeGenerator (Max Andersen)
-* enhanced outerjoin fetching support in queries
-* experimental support for DynaBeans as components
-
-Changes in version 1.2.3 (28.1.2003)
-------------------------------------
-* fixed a recently-introduced problem with Timestamp dirty checking
-* added createClob(), createBlob() for streams (Benoit Menendez)
-* SchemaUpdate now configures Dialect correctly (Michael Locher)
-* update() now working for classes with embedded composite ids
-* unsaved-value attribute now recognized for <composite-id>
-* fixed a minor problem where a very specific kind of SQL select did not qualify a column name
-* added Query.getQueryString()
-* fixed an NPE that sometimes occurred when hibernate.connection.username was not specified
-* fixed a bug in SchemaExport where foreign key constraints did not use qualified tablenames
-* added isFirst(), isLast() to ScrollableResults
-* fixed bug finding properties inherited by mapped interfaces
-
-Changes in version 1.2.1b (4.1.2003)
-------------------------------------
-* fixed an NPE that occurred while loading Hibernate classes in IBM JVM
-* arbitrary JNDI InitialContext properties may now be passed as hibernate.jndi.*
-* fixed a problem where index column was not being nullified when an entity was removed from a one-to-many
-
-Changes in version 1.2.1 (31.12.2002)
--------------------------------------
-* Changed the MySQL mapping of Hibernate "timestamp" to MySQL "DATETIME" (Matthias Schwinn)
-* TransactionManagerLookup classes now define defaut UserTransaction JNDI names
-* support for WebSphere 5 (Venkat Srinivasan)
-* fixed a bug with query expressions of the form "foo.bar.id" for normalized mappings
-* experimental Blob/Clob support (thanks to Benoit Menendez and Mark Woon)
-* improvements to SchemaUpdater (Benoit Menendez)
-* deprecated suspendFlushes() / resumeFlushes() in favor of FlushMode
-* deprecated IDGenerationException in favor of IdentifierGenerationException
-* fixed a bug introduced in 1.2 final where cascade save-update was sometimes ignored for readonly="true" bags
-* fixed a bug caching null-valued one-to-one associations
-* CodeGenerator now supports <bag> and <joined-subclass>
-* fixed problem with TimestampType on DB2 (Jonas)
-* fixed a bug in generated SQL for collections with <joined-subclass> mappings (Robson Miranda)
-* fixed a bug caching Maps (Benoit Menendez)
-* SchemaExport now accepts a .jar file as a source of mappings
-* hibernate.dbcp.validationQuery setting (Juozas Baliuka)
-* hibernate.c3p0.validate setting
-* added Query.setTimeout()
-* setMaxResults() now behaves sensibly on SAPDB (Russel Smyth)
-* added Query.setProperties() and Query.getNamedParameters(), fixed a bug in Query.getReturnTypes()
-* CodeGenerator now generates equals() and hashCode() for composite-id classes (and toString() for all classes)
-* CodeGenerator now includes superclass properties in subclass constructors (Max Andersen)
-* added Hibernate.custom()
-
-Changes in version 1.2 final (7.12.2002)
-----------------------------------------
-* fixed a bug where uppercase IS NOT NULL, NOT IN, etc were not parsed correctly
-* addition to readonly="true" bags now no longer requires collection initialization
-* added ResinTransactionManagerLookup (Aapo Laakkonen)
-* improved exception message when setting null to primitive type (Max Andersen)
-* improved exception message for an unserializable identifier
-* support for overloaded setter methods (patch by Alex Staubo)
-* CodeGenerator support for <composite-element> (patch by Wolfgang Jung)
-
-Changes in version 1.2 beta 4 (29.11.2002)
-------------------------------------------
-* fixed bugs in one-to-many associations to a <joined-subclass>
-* LockMode class now properly serializable
-* exceptions thrown by proxied objects are now propagated correctly (rather than being wrapped)
-* made Calendar types compilable in JDK1.2
-* added --format and --delimiter options to SchemaExport (thanks to Richard Mixon)
-* fix for problem with class with no properties + native id generation + MS SQL Server contributed by Max Andersen
-* fixed a BAD bug in Hibernate.configure() (thanks to Rob Stokes)
-* CodeGenerator now recognizes <key-many-to-one> (patch by Wolfgang Jung)
-* CodeGenerator now recognizes <version> and <timestamp> (patch by Max Andersen)
-
-Changes in version 1.2 beta 3 (26.11.2002)
-------------------------------------------
-* fixed bug in UPDATE SQL generation for <joined-subclass> mapping strategy (fix by Robson Miranda)
-* support <composite-id> correctly in CodeGenerator (patch by Tom Cellucci)
-* fixed an exception that occurred with short qualified tablenames
-* added the polymorphism attribute to the <class> element
-* allow "not between", "not in" in query language
-* allow subqueries beginning with a from clause in query language
-* query expressions like "not (foo.bar.baz=1)" now translated to "(bar.baz!=1 and foo.bar=bar.id)"
-* support for PostgreSQL ~ operator (regular expression match)
-* load(id, lockMode) now working for normalized table mappings
-* now compiling properly under JDK1.2, 1.3 (fix by Tom Cellucci)
-* support for subcollections in query language: foo.bars[2]['index'], foo.bars[4].elements, foo.bars[0].size, etc.
-* added calendar and calendar_date types
-* find() queries may now return scalar values
-* component-type properties may appear in a select clause
-* ConnectionProviders now set isolation level before toggle autocommit
-* Iterator.next() now throws NoSuchElementException as per Iterator contract (fix by Alex Staubo)
-* database reverse engineering GUI tool contributed by Tom Cellucci
-* SchemaExport now generates column in mapping file order (rather than alphabetical order)
-* <joined-subclass> mappings working on Oracle (?)
-
-Changes in version 1.2 beta 2 (15.11.2002)
-------------------------------------------
-* support multi-argument SQL functions in queries
-* reintroduced deprecated form of update() with slightly altered semantics
-* fixed BAD problem in the generated SQL for certain queries
-* added OrionTransactionManagerLookup
-
-Changes in version 1.2 beta 1 (11.11.2002)
-------------------------------------------
-* Fixed a bad bug binding to JNDI with servers that use serialization in preference to getReference()
-* support for quoted SQL identifiers (patch by Jean-Francois Nadeau)
-* Hibernate.initialize() allows the user to force initialization of a proxy or persistent collection
-* fix to minor bug in CodeGenerator by Max Andersen
-* fixed a problem with outerjoin fetching of one-to-one associations defined on subclasses
-* fixed a minor problem with proxies of classes that override finalize()
-* finished work on normalized table mappings using <joined-subclass> declaration (only for databases with ANSI OUTER JOIN and CASE)
-* deprecated hibernate-mapping.dtd in favor of hibernate-mapping-1.1.dtd
-* reworked unmapped class / interface / table-per-concrete-class query functionality, fixing several problems
-* removed deprecated methods
-* deprecated findIdentifiers()
-* fixed some problems with embedded composite identifiers
-* fixed a bug cascading deletes to one-to-one associations
-* CodeGenerator now generates isFoo() style getters for boolean properties (patch by Aapo Laakkonen)
-* components may now have a nonpublic constructor (patch by Jon Lipsky)
-* changes / bugfixes to MapGenerator tool
-* experimental SchemaUpdate tool contributed by Christoph Sturm
-
-Changes in version 1.1.8 (30.10.2002)
--------------------------------------
-* full support for composite keys in query language
-* fixed bug where character type could not be null
-* fixed bug parsing collection filters like: "group by this.date"
-* fixed a bad bug where C3P0 properties were not always being used
-* replaced hibernate.use_jdbc_batch with hibernate.jdbc.batch_size
-* renamed some other properties to hibernate.jdbc.*
-* made hibernate.show_sql settable from JMX (patch by Matas Veitas)
-* added SessionFactory.getAllClassMetadata(), getAllCollectionMetadata (patch by Max Andersen)
-* allowed use of concrete-class proxies with inherited classes ie. <subclass name="ConcreteClass" proxy="ConcreteClass">
-* HibernateException extends Apache commons lang NestableException (patch by Max Andersen)
-* <parent> subelement of <component> allows a component to get a reference back to owning entity
-* Query.setParameterList() to bind lists of values to "in (:list)"
-* Java constants may now be used in Queries
-* serialization of an object graph now removes all initialized proxies
-* several other improvements to proxy handling
-* proxies may now be used in JDK 1.2
-
-Changes in version 1.1.7 (25.10.2002)
--------------------------------------
-* added Session.createFilter()
-* fixed a bug parsing queries with properties of form idXXX (introduced in 1.1.6)
-* fixed a bug parsing queries with the id property named in the select clause (introduced in 1.1.6)
-* fixed a bug dirty checking big_decimal (fix by Andrea Aime)
-
-Changes in version 1.1.6 (24.10.2002)
--------------------------------------
-* classes without subclasses may now declare themselves as their own proxy
-* outer-join attribute now working for component properties and <many-to-many>
-* outer-join="true" will now force outerjoin loading for an association even if associated class has a proxy
-* enabled oracle-style outerjoins for SAP DB
-* version properties may now be long or short (previously always integer)
-* discriminators may now be boolean type
-* fixed the foo.bar.id.baz syntax for queries doing composite-key joins
-* fixed an NPE that occurred when no Dialect was specified
-* CodeGenerator now fully proxy-aware (patch by Max Andersen)
-* removed dependency upon trove4j
-
-Changes in version 1.1.5b (20.10.2002)
---------------------------------------
-* fixed an NPE that occurred on JMX startup
-* smarter fetching for one-to-one associations
-
-Changes in version 1.1.5 (19.10.2002)
--------------------------------------
-* added built-in currency and timezone types
-* hibernate-mapping-1.1.dtd
-- added <index-many-to-many> and <composite-index> subelements of <map>
-- added <key-property> and <key-many-to-one>
-- renamed "save/update" to "save-update"
-- tightened up the dtd (now using enumerated attribute types)
-* enabled multi-column map indexes (ie. key of a Map)
-* composited-id may now include a many-to-one association
-* improvements to Databinder contributed by Brad Clow
-* fixed bugs in minIndex, maxIndex, minElement, maxElement
-* fixed a problem with JTATransaction in a JBoss BMT bean
-* added addMapResource() to the MBean
-* minor improvements to Configuration
-* more accurate cache entry timestamping to increase the likelihood of cache hits
-* JCS cache may now be used with JTATransaction in WebSphere, Weblogic, JBoss (thanks to Matt Baird)
-* improvements to CodeGenerator contributed by Andrea Aime
-* stopped a TransientObjectException that was being thrown when it shouldn't be
-* re-enabled primary key export for tables of sets with not-null elements
-* hibernate.statement.fetch_size configuration contributed by Matas Veitas
-* added Interceptor application callback interface
-* added metadata package to expose persistence metadata to the application
-* changed filter() argument type from Collection to Object to allow filtering of arrays and Maps
-* added <column> index attribute to allow table indexes to be specified in mapping document
-* implemented support for queries against interfaces and abstract superclasses
-
-Changes in version 1.1.4b (4.10.2002)
--------------------------------------
-* fixed problems for JDK1.2 (thanks to Chris Webb)
-
-Changes in version 1.1.4 (4.10.2002)
-------------------------------------
-* New locking API
-* disabled 2-phase load for objects contained in Sets (because they should be initialized before equals() or hashCode() is called)
-* fixed a bug where non-serializable cache entries could not be cached by JCS auxiliary cache
-* fixed a bug in dirty checking PersistentEnums
-* deprecated getID() in favor of getIdentifier() (for mainly cosmetic reasons)
-* HibernateService may now be subclassed to obtain mapping files by some other mechanism (patch by Chris Winters)
-
-Changes in version 1.1.3 (1.10.2002)
-------------------------------------
-* new 2-phase loading process (replaces complicated "deferred" loading process)
-* new ScrollableResults interface for efficiently navigating Query results
-* removed deprecated interfaces
-* created engine package to hold "internal" APIs (ie. the external contract of the impl package)
-* fixed bug where a component defined before all collections in the mapping file caused collections to not be persisted (thanks to Michael Link)
-* fixed a bug where cascaded saveOrUpdate was ignoring the unsaved-value setting
-* faster Timestamp dirty checking
-
-Changes in version 1.1.2 (29.9.2002)
-------------------------------------
-* added persister attibute of class mapping to support custom persistence strategies
-* Support for Oracle outerjoins contributed by Jon Lipsky
-* Reworked versioning, fixing bugs (and tightening tests)
-* Fixed a bug where an ObjectNotFoundException was thrown for null one-to-one associations
-* fixed problems with timestamps introduced in 1.1.1
-* added batch file for running demo
-
-Changes in version 1.1.1 (27.9.2002)
-------------------------------------
-* Major refactoring / abstraction of persistence logic
-* added maxIndex, minIndex, maxElement, minElement properties for collections
-* added support for class names in where clause of queries
-* fixed a bug where an association could become null after caching
-* fixed a bug where an NPE could occur for a null component
-* fixed minor bugs in SortedMap, SortedSet
-* object type is now cacheable
-* added big_integer type
-* improved dirty checking for timestamp type
-
-Changes in version 1.1.0 (22.9.2002)
-------------------------------------
-* implemented collection indexing with [] in query language
-* fixed some minor query-language bugs
-
-Changes in version 1.1 beta 14 (19.9.2002)
-------------------------------------------
-* bags now implement java.util.List
-* delete() may now take a transient object
-* bug where sorted collections were not being sorted fixed by Brad Clow
-* fixed a bug in many-to-many association filtering
-* no longer try to query connection metadata when using user-supplied connections
-* added hibernate.use_scrollable_resultsets for user-supplied connections
-* fixed a problem where sublists were not being proxied
-* fixed a problem where Hibernate could not call methods of package-visibility classes
-* removed obsolete select attribute from MapGenerator
-* multiple occurrences of same path in a query no longer require multiple joins
-* added WrongClassException
-
-Changes in version 1.1 beta 13 (15.9.2002)
-------------------------------------------
-* added constants to Lifecycle interface
-* fix for circular cascade="save/update"
-* fixed a bug in cascaded update introduced in version 1.1 beta 11
-* added object type
-
-Changes in version 1.1 beta 12 (14.9.2002)
-------------------------------------------
-* Session.filter() for applying a filter query to collections
-* experimental ODMG API (OQL features are not yet compliant)
-* new DBCPConnectionProvider for Apache commons-dbcp connection pool
-* Session.lock() now does version number check even on databases with no FOR UPDATE clause
-* introduced new cascade styles: cascade="save/update", cascade="delete"
-* added default-cascade attribute
-* foreign key columns lengths now automatically set to primary key column lengths for SchemaExport
-* added error checking of row update counts when batching disabled
-* major improvements to ProxyGenerator tool
-* CodeGenerator now aware of proxy attribute
-* integrated PointbaseDialect contributed by Ed Mackenzie
-* fix for problem where Proxies were being initialized on identifier access by Christoph Sturm
-
-Changes in version 1.1 beta 11 (7.9.2002)
------------------------------------------
-* deprecated update() in favor of saveOrUpdate() and introduced unsaved-value attribute of <id>
-* children mapped with cascade="all" are now always saved/updated even without a call to update(parent)
-* support for composite-id classes where the composite id consists of properties of the persistent class
-* added constrained attribute to <one-to-one> element
-* added Validatable interface
-* renamed several config properties (Hibernate issues log warnings for obsolete property usage)
-* arbitrary JDBC connection properties may now be passed using hibernate.connection.*
-* fixed a classloading bug in C3P0ConnectionProvider (introduced in 1.1 beta 10)
-* CodeGenerator may now take multiple mapping files on the commandline
-
-Changes in version 1.1 beta 10 (28.8.2002)
-------------------------------------------
-* fixed a bug that occurred when calling Session.update() for an object with no properties
-* changed class loading to use the context classloader first
-* introduced <timestamp> as an alternative to <version>
-* added Query.getReturnTypes()
-* fixed a bug with composite-elements introduced in 1.1 beta 7
-* save() may now be used to persist classes with composite-ids
-* improved handling of nanoseconds values in Timestamps
-* support for composite id properties + objects in select clause of iterate()
-* beefed-up collection tests
-
-Changes in version 1.1 beta 9 (26.8.2002)
------------------------------------------
-* fixed a bug introduced in 1.1 beta 8 that could cause an NPE after deserializing a session with proxies
-* deprecated insert() in favor of more flexible save()
-* deprecated IDGenerator in favor of new IdentifierGenerator interface
-* "assigned" id generator now returns the existing value of the id property instead of throwing an Exception
-* fixed a problem where PreparedStatements were not being recached after retrieving a natively generated id
-
-Changes in version 1.1 beta 8 (25.8.2002)
------------------------------------------
-* fixed a bug introduced in 1.1 beta 6 where an updated element of an indexed one-to-many collection caused an SQLException
-* uninitialized collections passed to update() may now be initialized in the new Session
-* uninitialized proxies passed to update() may now be initialized in the new Session
-
-Changes in version 1.1 beta 7 (23.8.2002)
------------------------------------------
-* fixed a bug where Hibernate was not returning statements to the cache when batch updates were disabled
-* fixed a bad bug parsing mappings with toplevel one-to-many associations
-* fixed a bug with versioning and subcollections
-* reworked Set updates again for much improved efficiency
-* schema export now creates primary keys for indexed collection tables
-* minor refactor to Type hierarchy
-* improved some user-error detection
-* fixed foreign key constraint creation for MySQL with Innodb tables
-
-Changes in version 1.1 beta 6b (20.8.2002)
-------------------------------------------
-* Fixed a problem updating Sets
-* added <bag> mapping for java.util.Collection
-
-Changes in version 1.1 beta 6 (20.8.2002)
------------------------------------------
-* completely reworked fetching code
-- one-to-many associations now always fetched in a single select
-- many-to-many associations fetched in a single select when outerjoin fetching is enabled
-- this includes nested outerjoin fetching of the associated class!
-- outerjoin fetching for <many-to-one> nested inside <component> or <composite-element>
-- code refactored to be cleaner and faster
-* removed unnecessary order by clause in List and array fetching SQL
-* collections now individually update, insert and delete only rows that changed (thanks to Doug Currie)
-* fixed a problem where exceptions were being wrapped in a LazyInitializationException for non-lazy collections
-* added order-by attribute to <set> and <map> to specify a table column as defining the iteration order (JDK1.4 only)
-* improved error detection in Session.update()
-* further usage of JDBC2 batch updates
-* some fine-tuning of JDBC2 feature usage configuration
-* CodeGenerator will now generate components and arrays
-* fixed problem where CodeGenerator could not generate classes in the default package
-* improved logging of flush() activity
-* renamed property hibernate.use_jdbc2 to hibernate.use_jdbc_batch
-
-Changes in version 1.1 beta 5 (13.8.2002)
------------------------------------------
-* hibernate.query.imports property to allow use of unqualified classnames in queries
-* fixed a bug in collection flushing that was introduced in 1.1 beta 4
-
-Changes in version 1.1 beta 4 (11.8.2002)
------------------------------------------
-* JMX integration (thanks to John Urberg)
-* "having" clause in query language
-
-Changes in version 1.1 beta 3 (10.8.2002)
------------------------------------------
-* removed the select="all" attribute for <class> mappings - "select distinct" now specified in the hibernate query
-* system properties now override hibernate.properties
-* Session now flushes changes even less often (only when actual updates to the queried table(s) are waiting)
-* fixed a *very* rare problem where an unnecessary update could be accidently issued before a delete
-
-Changes in version 1.1 beta 2 (6.8.2002)
-----------------------------------------
-* fixed a bug exporting schemas with identity columns
-* implemented factory-level caching of collections
-* Datastore.storeJar() contributed by Christian Meunier
-* added <mapping jar="jarfile"> to hibernate.cfg.xml
-
-Changes in version 1.1 beta 1 (4.8.2002)
-----------------------------------------
-* new Query API including named parameters, pageable results
-* subqueries in Hibernate queries (only for databases that support subselects)
-* new DocBook documentation (contributed by Christian Bauer)
-* support collections .elements, .indices inside select clause (even in aggregate functions)
-* don't load collections before removal unless absolutely necessary
-* mutable="false" attribute in <class> element to map immutable classes
-* use JDBC batch to insert collection elements if hibernate.use_jdbc2 is set
-* brand new PreparedStatementCache
-* improvements to MYSQL dialect for long datatypes
-* always check isAccessible() before setAccessible(true)
-* removed extra unnecessary table join in queries with one-to-many association
-* removed ugly "WHERE 1=1" from generated SQL
-* fixed exception mapping a class with no properties (fix by Rob Stokes)
-* logging enhancements including SQLException logging
-* reworked factory-level cache and integrated JCS support (thanks to Christian Meunier)
-* fixed a bug with circular references in cached data
-* removed blocking cache support
-* now rendering outerjoins as "LEFT OUTER JOIN" because "LEFT JOIN" caused problems for some Sybase versions
-* added default Hibernate properties to Dialects
-* native id generation now falls back to sequence id generation when identity columns not supported by the dialect
-* fixed some problems with native id generation under HSQL
-* may now use Session.insert() even when using native id generation
-
-Changes in version 1.0.1b (18.7.2002)
--------------------------------------
-* fixed a bad bug in query parser when hibernate.query.substitutions was unset
-* much improved build.xml Ant script
-* latest c3p0.jar
-
-Changes in version 1.0.1 (17.7.2002)
-------------------------------------
-* enabled use of scalar values and aggregate SQL functions in select clause of iterate() queries
-* fixed bug in JNDI lookup for SessionFactory
-* changed ordering of SQL inserts/deletes for child collections of a cascade-enabled association
-- better behaviour for some not-null constraints
-- performance optimization for bidirectional many-to-one associations
-* added hibernate.query.substitutions property to allow named query constants (eg. translate 'true' to '1')
-* added locale type for java.util.Locale
-* added sequence hi/lo generator (seqhilo.long)
-* fixed bug where load(), onLoad() callbacks were sometimes called at wrong time
-* fixed an exception (fix by Eric Everman) and improved identifier searching in MapGenerator tool
-* refactored SerializableType
-* extra logging + error handling
-* documentation enhancements
-
-Changes in version 0.9.17 (3.7.2002)
-------------------------------------
-* Added UserType interface
-* documented Lifecycle
-* added some new trace messages to log
-* bugfix to allow SQL functions like upper(), lower(), etc to work on all platforms
-* documented SAP DB support (dialect contributed by Brad Clow)
-* foreign key constraint export for SAP DB
-* map index may be the composite-id of the element class (contributed by Jon Lipsky)
-* fixes to CodeGenerator tool (contributed by Uros Jurglic)
-
-Changes in version 0.9.16 (19.6.2002)
-------------------------------------
-* fixed bug cacheing objects with references to themselves
-* support for composite ids of classes with no id property
-* may now disable outer join (deep) fetching for an association by setting outer-join="false"
-* enabled outer join fetching for one-to-one
-* fixed a bug for mappings that specify class attribute of <one-to-many>
-* fixed a bug where Hashbelt did not expire cached data in a timely fashion
-* fixed a mistake in the mapping DTD
-* new user-error check in update()
-
-Changes in version 0.9.15 (15.6.2002)
-------------------------------------
-* one-to-one associations
-* support for "tricky" mappings in SchemaExport tool (multiple properties to one column, etc)
-* Transaction API contributed by Anton van Straaten
-* SessionFactory may be bound to JNDI name by setting hibernate.session_factory_name
-* Sessions are now Serializable!
-* added Session.findIdentifiers() query methods
-* new Lifecycle interface to replace deprecated PersistentLifecycle
-* fixed problem where session did not autoflush on iterate() queries
-* performance enhancements to collection dirty checking
-* added Hibernate.configure() and configuration file format
-* removed some deprecated methods
-* refactored Type hierarchy
-* query language identifiers now case sensitive (bugfix for case sensitive SQL dialects)
-* username/password now optional for datasource (contributed by Emmanuel Bourg)
-* much improved API documentation
-* binary types now saved using streams if hibernate.use_streams_for_binary=true (contributed by Jon Lipsky)
-* MySQL Strings now mapped to TEXT columns if length > 255 (contributed by Christoph Beck)
-
-Changes in version 0.9.14 (4.6.2002)
--------------------------------------
-* lifecycle objects - properties now have a cascade attribute to cascade save, update, delete
-* composite id properties may now be used in queries eg. foo.id.bar (contributed by Jon Lipsky)
-* slightly changed semantics of update() so it now also save()s new transient instances
-* Session now flushes() itself less often before query execution (performance enhancement)
-* fixed problem where Session.save() returned null instead of the natively generated id
-* fixed bug with object identity for cached classes
-* fixed bug where delete(x) could not be called after update(x)
-* MUCH improved Exception hierarchy
-* deprecated create()
-* added sql-type attribute to <column> tag to allow user to override default type mapping
-* deeper fetching with use_outer_join
-* new ConnectionProvider framework
-* fixed a bug where blocking cache could return stale data
-* now working again in JDK1.2.2
-* fixed problem with not-null associations + native key generation
-* minor changes to PersistentLifecycle interface
-* initial, minimal version of new Transaction mechanism
-* MUCH improved documentation
-
-Changes in version 0.9.13 (25.5.2002)
--------------------------------------
-* Datastore.storeResource() to load mapping files from classpath
-* fixed a problem executing under JDK1.3 when compiled from JDK1.4
-* documentation improvements
-
-Changes in version 0.9.12 (24.5.2002)
-------------------------------------
-* Session.update() methods to update a persistent instance from transient copy (as requested by many users)
-* discriminator column name, type, length, etc now configurable by <discriminator> tag in mapping file
-* discriminator column values configurable by discriminator-value attribute of <class> and <subclass> tags
-* added Session.insert(object, id) for classes with no identifier property
-* fixed another bad bug with connection handling (fix by Anton van Straaten)
-* fixed a problem with deferred loading
-* fixed a problem with sorted collections (fix by Anton van Straaten)
-* nested collections of objects now require 2 SQL SELECTs to load, rather than size+1
-* session is NO LONGER atomic - application should discard session when exception occurs
-* fixed problem where character type was mapped to VARCHAR column
-* arrays of proxies now possible by using new element-class attribute of <array> tag
-* fixed various problems with proxies
-* added proxy generation tool
-* proxy unit tests
-* replaced two RuntimeExceptions with checked exceptions
-* made hibernate.username/hibernate.password optional for DriverManager
-* CodeGenerator now supports all hibernate basic types
-* much improved caching algorithm for compiled queries
-* may now specify properties simply by placing hibernate.properties in classpath
-* documentation improvements + fixes
-* --abstract switch to MapGenerator (contributed by Eric Everman)
-
-Changes in version 0.9.11 (12.5.2002)
-------------------------------------
-* fixed major bug with connection handling (fix by Anton van Straaten)
-
-Changes in version 0.9.10 (11.5.2002)
-------------------------------------
-* set a default schema name using SessionFactory property hibernate.default_schema
-* code generator tool contributed by Brad Clow (www.workingmouse.com)
-* lazy object initialization under JDK 1.3 and above
-* fixed some error messages to go to logging framework, not stdout
-* new system property hibernate.show_sql=true logs all executed SQL to stdout
-* integration of bugfixes in c3p0
-* wrap IllegalArgumentExceptions in HibernateExceptions
-* added ObjectNotFoundException and StaleObjectStateException
-* fixed a bug when using schemas
-* new caching strategy (and documented cache feature)
-
-Changes in version 0.9.9 (25.4.2002)
------------------------------------
-* sorted sets and maps (thanks to Doug Currie)
-* mapping files may now be loaded using getResourceAsStream() (thanks to Markus Meissner)
-* hibernate messages now logged by Apache commons-logging
-* default hi/lo generator table now has column named "next_id", instead of "next"
-* query language may now refer to identifier property name (eg. foo.fooKey as alternative to foo.id)
-* hibernate.jndi_class, hibernate.jndi_url now optional when using datasource
-* hibernate now throws an exception if you try to persist an object with a reference to a transient object
-* improved connection pooling algorithm (hibernate.pool_size limits pooled conections)
-* very experimental integration of c3p0 JDBC connection pool (http://sourceforge.net/projects/c3p0)
-* now compiles under JDK 1.2.2
-* fixed bug persisting null components
-* fixed bug where cached prepared statements were not cleaned up after disconnect() session
-* fixed a null pointer exception in MappingByReflection
-
-Changes in version 0.9.8 (13.3.2002)
------------------------------------
-* supports database native key generation in Sybase, MS SQL, MySQL, DB2, Hypersonic (contributed by Christoph Sturm)
-* supports Mckoi (dialect contributed by Doug Currie)
-* supports Progress (dialect contributed by Phillip Baird)
-* added exceptions to catch Session reentrancy from PersistentLifecycle.load() + store()
-* experimental cross-transaction cache
-* Session.lock() and Session.loadWithLock() for pessimistic locking
-* HiLoGenerators may now use their own DriverManager connection properties + may now use same table across diff mapping files
-* Session.flush(), Session.close() and Session.connection() replace Session.commit(), Session.cancel()
-* Session.disconnect() and Session.reconnect() for long transactions
-* added single JVM id generators vm.long, vm.hex
-* added unique column constraints to mappings
-* extensions to IDGenerator framework
-* support sequence-style ID generation in Oracle, PostgreSQL, DB2, Interbase
-
-* fixed problem where subcollections of a collection that changed roles would be deleted
-* changed class loading strategy to be compatible with JBoss
-* stopped queries retrieving unnecessary columns
-* mutable types (binary + serializable) now always detected as dirty
-
-Changes in version 0.9.7 (26.2.2002)
------------------------------------
-* save() now safe from foreign key violations (so create() is no longer preferred method of adding data)
-* delete() now completely safe from foreign key violations - it no longer matters what order objects are deleted in
-* removed Session.copy()
-* hilo generators now NOT for use with application server datasources
-
-* fixed two intermittent bugs in queries
-* fixed a problem where components not detected as dirty
-* fixed broken hilo generator which was not updating database
-* fixed a minor bug when hibernate.use_outer_join was set
-
-Changes in version 0.9.6 (24.2.2002)
------------------------------------
-* experimental XML generation
-* added support for bi-directional associations (one-to-set, set-to-set) with <set readonly="true"> config
-* reflective generation of mappings tool was contributed by Doug Currie
-* Session operations now atomic, so exceptions are recoverable
-* made ID properties optional in persistent classes
-* support for multiple schemas through schema attribute of <hibernate-mapping>, <class>, <set>, <map>, etc.
-* auto-creation of tables for hilo id generators (restriction: cannot use same table from more than one mapping file)
-* added some more assertions to catch user "mistakes" like deleting transient or saving persistent objects
-
-* major rework of collections and fixed some bad bugs
-* lazy initialization re-enabled for one-to-many associations (thanks to Georg Schneemayer)
-* fixed a problem in the mapping DTD to allow nested components in collections
-* fixed a BAD bug in RelationalDatabaseSession when loading objects with PersistentLifecycle callbacks (thanks to Paul Szego)
-* fixed problems with quoted strings in query language
-* fixed a bug where a stack overflow occurred instead of HibernateException thrown (thanks to Georg Schneemayer)
-* fixed a bug deleting updated versioned data
-* fixed some problems with name generation for indexes + foreign keys
-* fixed problem in Sun JDK 1.4 (only?) where IllegalArgumentException was not handled
-* minor improvements to handling of dates and times
-* HiLoGenerator now safe for all transaction isolation levels + safe when rollback occurs
-* noticed and fixed obscure piece of nonthreadsafe code outside of core persistence engine
-* removed unnecessary drop constraints for some dialects
-
-* MUCH more comprehensive test suite
-
-* changed some terminology used in documentation
-* added javadoc for API classes
-* commented the mapping DTD
-
-Changes in version 0.9.5 (8.2.2002)
------------------------------------
-* supports HypersonicSQL (dialect contributed by Phillip Baird)
-* supports Microsoft SQL server (with third party JDBC driver)
-* proper command-line tool for schema generation and export
-* deprecated the interface cirrus.hibernate.Persistent (due to popular demand)
-* changes to hibernate-mapping DTD (required to support optional Persistent interface):
-- deprecated <property type="package.PersistentClassName"/> in favor of <many-to-one class="package.PersistentClassName"/>
-- deprecated <element type="package.PersistentClassName"/> in favor of <many-to-many class="package.PersistentClassName"/>
-- deprecated <property role="..."/> in favor of <collection role="..."/>
-- deprecated <element role=".."/> in favor of <subcollection role="..."/>
-- deprecated <association> in favor of <one-to-many>
-* class attribute optional in <component> and <composite-id> tags (determined by reflection)
-* querying components of components now supported
-* one-shot table creation (no use of unportable "alter table")
-* time dataype support
-* reflective mappings of java.sql.Time, java.sql.Timestamp, java.sql.Date
-* fixed error msg thrown when class is missing a method but has a superclass
-* property names now conform to JavaBean spec ("foo" instead of "Foo"). Note that "Foo" still works
-* constructors of persistent classes may now be non-public
-* collection indexes now mapped to not-null columns
-* fixed obscure bug with querying collections inside components of components
-* fixed potential bug related to cacheing of compiled queries
-* major rewrite of code relating to O-R mappings
-* Session.copy() and Session.equals() as convenience for users
-* fixed repeated invocations of hasNext() on iterator + iterators now always work with distinct SQL resultsets
-* McKoi dialect was contributed by Gabe Hicks
-
-Changes in version 0.9.4 (29.1.2002)
-------------------------------------
-* fixed BAD bug where XML parsing would not work for parsers other than Xerces - thanks to Christian Winkler
-* added some more assertions to catch user "mistakes" like changing ids or reusing existing ids
-
-Changes in version 0.9.3 (27.1.2002)
-------------------------------------
-* repackaged (corrupted DatasourceConnectionProvider.class)
-* better exception reporting using datasource
-* added Datastore.storeClass() which looks for mapping file in classpath (class foo.Bar -> foo/Bar.hbm.xml)
-* improved documentation
-
-Changes in version 0.9.2 (25.1.2002)
-------------------------------------
-* iterate over query results (lazy instantiation of query results)
-* added "select foo, bar" style queries returning multiple objects per row
-* delete by query
-* composite key support
-* outer joins for faster (?) loading of associated objects ( set "hibernate.use_outer_join" to "true" )
-* connection pooling when using DriverManager
-* foreign key constraint from unkeyed collection table to owner entity table
-* improved drop tables script execution (still not infallible)
-* added <composite-element> tag
-* added not-null properties and elements
-* added an optimisation for dates and components
-* made some XML attributes optional
-* fixed errors in documentation + documented some extra features
-* bugfix: store() not getting called on lifecycle interface
-* bugfix: schema generation for indexed associations
-* added many tests
-
-Changes in version 0.9.1 (20.1.2002)
-------------------------------------
-Too many to list
-
-version 0.8.1
--------------
-Initial alpha version
-
Copied: core/tags/hibernate-3.3.1.GA/changelog.txt (from rev 15176, core/branches/Branch_3_3/changelog.txt)
===================================================================
--- core/tags/hibernate-3.3.1.GA/changelog.txt (rev 0)
+++ core/tags/hibernate-3.3.1.GA/changelog.txt 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,2661 @@
+Hibernate Changelog
+===================
+Note: Newer entries are automatically generated and the description might not
+match the actual issue resolution (i.e. a bug might not be a bug). Please
+refer to the particular case on JIRA using the issue tracking number to learn
+more about each case.
+
+
+Changes in version 3.3.1.GA (2008.09.10)
+-------------------------------------------
+
+** Bug
+ * [HHH-2694] - create-drop with c3p0 causes SQLException
+ * [HHH-3231] - org.hibernate.id.enhanced.TableGenerator throws "IllegalArgumentException: alias not found: tbl" under Oracle
+ * [HHH-3392] - Query Cache entries are not distributable
+ * [HHH-3472] - JTASessionContext broken for WebSphere
+
+** Improvement
+ * [HHH-2686] - Include a primary key in the sequence table used by id.enhanced.TableGenerator
+ * [HHH-3249] - Make o.h.id.enhanced.TableGenerator more extension-friendly
+ * [HHH-3424] - concat() with param binding fails function on derby
+ * [HHH-3454] - Allow enhanced.TableGenerator to segment itself per entity as default
+ * [HHH-3456] - Make o.h.id.enhanced.SequenceStyleGenerator more extension-friendly
+ * [HHH-3471] - Provide true-false type that maps to int values
+
+** Task
+ * [HHH-3474] - Upgrade to use slf4j 1.5 (1.5.2)
+
+
+Changes in version 3.3.0.SP1 (2008.08.19)
+-------------------------------------------
+
+** Bug
+ * [HHH-3437] - re-add incorrectly removed public getSource() methods on events
+
+
+Changes in version 3.3.0.GA (2008.08.13)
+-------------------------------------------
+
+** Bug
+ * [HHH-2021] - org.hibernate.cache.QueryKey has a fragile equals() method
+ * [HHH-3333] - build Wiki has a typo and includes a lie re:jdk version
+ * [HHH-3378] - DB2CustomSQLTest fails, need "RESULT SETS 1" in proc definitions
+ * [HHH-3430] - distribution bundles cglib directly instead of the hibernate repackaging
+
+** Improvement
+ * [HHH-2926] - All *Event must inherit AbstractEvent
+ * [HHH-3247] - Provide more information in TypeMismatchException message
+
+
+
+Changes in version 3.3.0.CR2 (2008.07.31)
+-------------------------------------------
+
+** Bug
+ * [HHH-1697] - OracleDialect fails to recognize sequence accessible through syonyms when validating schema
+ * [HHH-2604] - Isolator.JdbcDelegate masks the exception if it isn't possible to open a connection.
+ * [HHH-2683] - "datediff" is declared as NoArgSQLFunction in H2Dialect, but actually accepts 3 arguments.
+ * [HHH-3006] - ConcurrentModificationException in AbstractBatcher results in infinite loop
+ * [HHH-3229] - Merge can fail when there is a transient entity reachable by multiple paths and at least one path does not cascade on merge
+ * [HHH-3257] - Content images not displayed
+ * [HHH-3260] - Hibernate wraps a listener init or destroy exception into an AssertionFailure
+ * [HHH-3261] - Do not wrap exceptions raised by event listeners (at init or destroy time)
+ * [HHH-3265] - change license url in pom to http://www.gnu.org/licenses/lgpl-2.1.html
+ * [HHH-3266] - distribution bundle missing jta dependency
+ * [HHH-3272] - using of Integer.valueOf(int), which is not available in JDK 1.4
+ * [HHH-3282] - DB2Dialect should report supportsLobValueChangePropogation() == false
+ * [HHH-3309] - Serialize/Deserialize problem in AbstractLazyInitializer with entitymode.MAP.
+ * [HHH-3409] - ResultTransformers need smarter equals() and hashCode() impls
+
+** Improvement
+ * [HHH-1786] - JTASessionContext.CleanupSynch does not remove sessions from currentSessionMap
+ * [HHH-2060] - To be able to use <generator> with <composite-id>
+ * [HHH-2506] - Make javassist the default ByteCodeProvider
+ * [HHH-2875] - repackage cglib/asm under org.hibernate namespace
+ * [HHH-3269] - upgrade to jDocBook plugin version 2.1.1
+ * [HHH-3283] - protect BulkManipulationTest#testInsertWithGeneratedTimestampVersion where Dialect#supportsParametersInInsertSelect == false
+ * [HHH-3358] - Enable JTATransactionFactory and JTATransaction factory to work without JNDI
+ * [HHH-3390] - Use READ_COMMITTED for JBC 2 cache
+
+** Patch
+ * [HHH-3294] - Version incorrectly incremented for unchanged persistent entity that is parent of a one to many relationship
+
+** Task
+ * [HHH-3270] - follow up on documentation license questions
+
+
+
+Changes in version 3.3.0.CR1 (2008.04.28)
+-------------------------------------------
+
+** Bug
+ * [HHH-1312] - Unclosed ResultSet when using Identity
+ * [HHH-1396] - Table.validateColumns fails on valid column
+ * [HHH-1569] - Immutable Natural Id check fails with ArrayIndexOutOfBounds in some cases
+ * [HHH-1593] - Infinite loop/StackOverflow when calling configuration.setListener(null)
+ * [HHH-1753] - DB2Dialect.getCurrentTimestampSQLFunctionName() uses Oracle syntax
+ * [HHH-1916] - param values in generator element should be trimmed during HbmBinding
+ * [HHH-1920] - Incorrect documentation regarding XML manipulation in Hibernate reference manual (chapter 18.3).
+ * [HHH-1956] - Interceptor.afterTransactionCompletion not called with JTATransaction (CacheSynchronization.hibernateTransaction not set)
+ * [HHH-2159] - NullPointerException in FromElement#findIntendedAliasedFromElementBasedOnCrazyJPARequirements with 'hibernate.query.jpaql_strict_compliance' enabled
+ * [HHH-2164] - Minor bug in section "20.1.1. Customizing the schema"
+ * [HHH-2200] - Memory leak in AbstractBatcher with Generated Properties
+ * [HHH-2320] - Regression: optional properties under a <join> tag no longer update properly
+ * [HHH-2503] - AbstractEntityPersister swallows JDBCExceptions in processGeneratedProperties
+ * [HHH-2513] - Abusive WARN logged during deserialization of replicated SessionFactory
+ * [HHH-2542] - NullPointerException in TypeFactory.replaceAssociations for ComponentType
+ * [HHH-2553] - New LoadContexts Implementation causing possible performance degradation
+ * [HHH-2593] - Keyword UNION is prefixed with "this_." in filter conditions
+ * [HHH-2616] - No event is fired on Collection recreate/remove/update action
+ * [HHH-2627] - Generated properties leak prepared statements in Hibernate 3.2.3 and higher.
+ * [HHH-2631] - Leaking PreparedStatement and ResultSet via CollectionLoadContext instances maintained in Map collectionLoadContexts in LoadContexts
+ * [HHH-2711] - PropertyAccessException with backref and <composite-map-key/>
+ * [HHH-2726] - spelling o your CLASSPATH
+ * [HHH-2728] - Calling session.clear() while retrieving objects via an iterator will cause a "LazyInitializationException - No Session" by the CGLIBLazyInitializer
+ * [HHH-2788] - Oracl8iDialect No Dialect mapping for JDBC type 91
+ * [HHH-2795] - CollectionLoadContexts for empy collections are not removed until PersistenceContext.clear()
+ * [HHH-2816] - DefaultFlushEntityEventListener.checkNaturalId() causes extra SELECTs on read-only entities
+ * [HHH-2833] - insert-select query fails with NPE when select includes join
+ * [HHH-2857] - schemaSupport for HSQLDialect remote connections doesn't work
+ * [HHH-2861] - cascade="delete-orphan,all" is ignored
+ * [HHH-2863] - testsuite fix-ups for maven and/or directory changes
+ * [HHH-2864] - Merging a detached instance with a new child in a unidirectional one-to-many association fails if the parent was previously loaded as a proxy
+ * [HHH-2892] - skip up-to-date checks of query cache for natural-id only if immutable
+ * [HHH-2928] - optimizers for enhanced id generators should be synchronized against multi-threaded access
+ * [HHH-2948] - QueryStatistics.executionMinTime always = 0
+ * [HHH-3111] - WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getStatus() implemented incorrect
+ * [HHH-3140] - Region prefix ignored for entities and collections
+
+** Deprecation
+ * [HHH-2755] - Wrong "jsdk.jar" referenced in the tutorial
+
+** Improvement
+ * [HHH-1786] - JTASessionContext.CleanupSynch does not remove sessions from currentSessionMap
+ * [HHH-2048] - Incomplete MappingException at org.hibernate.mapping.SimpleValue
+ * [HHH-2156] - Section 19.3, "Managing the caches" doesn't document CacheMode.IGNORE
+ * [HHH-2533] - redesign Cache/CacheProviders
+ * [HHH-2662] - Workaround PostgreSQL issues in testsuite
+ * [HHH-2663] - Map java.sql.Types.REAL to Hibernate FloatType for auto-discovery stuff
+ * [HHH-2665] - Split Oracle9Dialect into Oracle9iDialect and Oracle10gDialect
+ * [HHH-2669] - Unequivocally map MySQL LOB types to the LONG variant
+ * [HHH-2682] - support for auto-discovery of H2 dialect
+ * [HHH-2696] - Consider migrating to slf4j
+ * [HHH-2761] - Handle null and empty string consistently in PropertiesHelper
+ * [HHH-2778] - TransactionManagerLookup implementation for Bitronix Transaction Manager
+ * [HHH-2789] - Section 19.2 of the documentation does not show OSCache as supporting clusters. It does.
+ * [HHH-2822] - timestamp extraction functions for SAPDBDialect
+ * [HHH-2826] - IS [NOT] NULL checks with component values
+ * [HHH-2859] - Introduce a 'Work' API for user to perform JDBC work
+ * [HHH-3131] - Add a method to ActionQueue to tell whether there are currently entries in the executions collection
+
+** New Feature
+ * [HHH-1] - Optimize Hibernate for the bulk insertion of related entities
+ * [HHH-2555] - Create new RegionFactory for JBossCache
+ * [HHH-2884] - Provide a sessionFactory close event or hook for the event listeners
+
+** Patch
+ * [HHH-952] - Patch to allow subqueries with joins using Criteria API and Subqueries with DetachedCriteria
+ * [HHH-2070] - Expand DB2Dialect auto-discovery support (Martin Renner)
+ * [HHH-2519] - Schema dropping not documented with hibernate.hbm2ddl.auto=create
+ * [HHH-2630] - Hibernate Dialect is not auto-detected for Sybase ASE and DB2 (Shelley McGowan)
+ * [HHH-2758] - Patch IngresDialect based on certification
+ * [HHH-2839] - Don't use dummy dual table for hsqldb (David Bala?ic)
+ * [HHH-2849] - Better error logging in IdentifierGeneratorFactory (Antony Stubbs)
+ * [HHH-2957] - ActionQueue Insertion sort performance degrades exponentially (Jay Erb)
+ * [HHH-3084] - DialectFactory detection of Ingres metadata (Michael Leo)
+
+** Task
+ * [HHH-2702] - Officially move to JDK 1.4
+ * [HHH-2704] - Migrate to Maven2 for build
+
+
+Changes in version 3.2.6 (2008.02.07)
+-------------------------------------------
+
+** Bug
+ * [HHH-925] - DetachedCriteria.createCriteria not working with alias
+ * [HHH-1312] - Unclosed ResultSet when using Identity
+ * [HHH-1329] - SchemaValidator fail when views are involved
+ * [HHH-1593] - Infinite loop/StackOverflow when calling configuration.setListener(null)
+ * [HHH-1685] - DetachedCriteria doesn't create alias on subcriteria
+ * [HHH-1753] - DB2Dialect.getCurrentTimestampSQLFunctionName() uses Oracle syntax
+ * [HHH-1916] - param values in generator element should be trimmed during HbmBinding
+ * [HHH-1956] - Interceptor.afterTransactionCompletion not called with JTATransaction (CacheSynchronization.hibernateTransaction not set)
+ * [HHH-2016] - Oracle9Dialect registers last_day() function as "lastday"
+ * [HHH-2159] - NullPointerException in FromElement#findIntendedAliasedFromElementBasedOnCrazyJPARequirements with 'hibernate.query.jpaql_strict_compliance' enabled
+ * [HHH-2200] - Memory leak in AbstractBatcher with Generated Properties
+ * [HHH-2261] - Setting hibernate.hbm2ddl.auto=validate causes problems on mySQL with numeric fields
+ * [HHH-2320] - Regression: optional properties under a <join> tag no longer update properly
+ * [HHH-2503] - AbstractEntityPersister swallows JDBCExceptions in processGeneratedProperties
+ * [HHH-2542] - NullPointerException in TypeFactory.replaceAssociations for ComponentType
+ * [HHH-2593] - Keyword UNION is prefixed with "this_." in filter conditions
+ * [HHH-2598] - Mapping a collection of entities from two different classes with the same collection name results in duplicate backref property exception if collection keys are not null
+ * [HHH-2616] - No event is fired on Collection recreate/remove/update action
+ * [HHH-2627] - Generated properties leak prepared statements in Hibernate 3.2.3 and higher.
+ * [HHH-2728] - Calling session.clear() while retrieving objects via an iterator will cause a "LazyInitializationException - No Session" by the CGLIBLazyInitializer
+ * [HHH-2788] - Oracl8iDialect No Dialect mapping for JDBC type 91
+ * [HHH-2795] - CollectionLoadContexts for empy collections are not removed until PersistenceContext.clear()
+ * [HHH-2816] - DefaultFlushEntityEventListener.checkNaturalId() causes extra SELECTs on read-only entities
+ * [HHH-2833] - insert-select query fails with NPE when select includes join
+ * [HHH-2857] - schemaSupport for HSQLDialect remote connections doesn't work
+ * [HHH-2861] - cascade="delete-orphan,all" is ignored
+ * [HHH-2864] - Merging a detached instance with a new child in a unidirectional one-to-many association fails if the parent was previously loaded as a proxy
+ * [HHH-2892] - skip up-to-date checks of query cache for natural-id only if immutable
+ * [HHH-2928] - optimizers for enhanced id generators should be synchronized against multi-threaded access
+ * [HHH-2948] - QueryStatistics.executionMinTime always = 0
+
+** Improvement
+ * [HHH-1630] - duplicate property mapping - more details
+ * [HHH-1696] - Add outer join support for aliases on DetachedCriteria
+ * [HHH-2048] - Incomplete MappingException at org.hibernate.mapping.SimpleValue
+ * [HHH-2682] - support for auto-discovery of H2 dialect
+ * [HHH-2761] - Handle null and empty string consistently in PropertiesHelper
+ * [HHH-2822] - timestamp extraction functions for SAPDBDialect
+ * [HHH-2826] - IS [NOT] NULL checks with component values
+ * [HHH-2852] - Better error messages when schema validation fails
+
+** Patch
+ * [HHH-952] - Patch to allow subqueries with joins using Criteria API and Subqueries with DetachedCriteria
+ * [HHH-2070] - Expand DB2Dialect auto-discovery support (Martin Renner)
+ * [HHH-2839] - Don't use dummy dual table for hsqldb (David Bala?ic)
+ * [HHH-2849] - Better error logging in IdentifierGeneratorFactory (Antony Stubbs)
+ * [HHH-2957] - ActionQueue Insertion sort performance degrades exponentially (Jay Erb)
+ * [HHH-3084] - DialectFactory detection of Ingres metadata (Michael Leo)
+
+** Task
+ * [HHH-2559] - http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd needs to be updated
+ * [HHH-3085] - Remove connector.jar (unnecessary library)
+ * [HHH-3086] - Remove jdbc2_0-stdext.jar (unnecessary library)
+
+
+Changes in version 3.2.5 (2007.07.31)
+-------------------------------------------
+
+** Bug
+ * [HHH-1116] - batch-size typo
+ * [HHH-1561] - Missing " in Documentation for H3, Chapter 15.8
+ * [HHH-1569] - Immutable Natural Id check fails with ArrayIndexOutOfBounds in some cases
+ * [HHH-1694] - Documentation Outdated: "10.4.4. Queries in native SQL"
+ * [HHH-2180] - minordocumentation error in hbm xml
+ * [HHH-2201] - session.iterate() does not exist
+ * [HHH-2267] - A copy/paste mistake in the documentation for <schemavalidator> ant task
+ * [HHH-2334] - Documentation error in section 5.1.3
+ * [HHH-2420] - Error in 2.5. Contextual Sessions
+ * [HHH-2502] - The second level caching documentation states that ehcache is not distributed.
+ * [HHH-2631] - Leaking PreparedStatement and ResultSet via CollectionLoadContext instances maintained in Map collectionLoadContexts in LoadContexts
+ * [HHH-2649] - Batcher configuration parameter incorrectly documented
+ * [HHH-2711] - PropertyAccessException with backref and <composite-map-key/>
+ * [HHH-2713] - duplicated phrase in docs "of the of the"
+ * [HHH-2714] - Three typos in code examples
+ * [HHH-2719] - adddress --> address
+ * [HHH-2720] - Monetory --> Monetary
+
+** Improvement
+ * [HHH-1022] - incomplete documentation in _README.txt in the lib directory
+ * [HHH-1682] - Improve the description of differences between save() and persist()
+ * [HHH-2048] - Incomplete MappingException at org.hibernate.mapping.SimpleValue
+ * [HHH-2417] - Update book on Hibernate reference
+ * [HHH-2418] - Refer HSQL DB website in chapter 1.2.3
+ * [HHH-2487] - Typo in "5.1.7. version (optional)"
+ * [HHH-2550] - Update API Class in 10.4.3. Criteria queries
+ * [HHH-2662] - Workaround PostgreSQL issues in testsuite
+ * [HHH-2663] - Map java.sql.Types.REAL to Hibernate FloatType for auto-discovery stuff
+ * [HHH-2665] - Split Oracle9Dialect into Oracle9iDialect and Oracle10gDialect
+
+** Patch
+ * [HHH-2520] - Miscellaneous config doc spelling fixes
+ * [HHH-2630] - Hibernate Dialect is not auto-detected for Sybase ASE and DB2 (Shelley McGowan)
+ * [HHH-2758] - Patch IngresDialect based on certification
+
+** Task
+ * [HHH-2551] - Deprecate org.hibernate.criterion.Expression
+ * [HHH-2566] - Replace usages of FlushMode.NEVER with FlushMode.MANUAL
+ * [HHH-2567] - Update reference to use FlushMode.MANUAL
+ * [HHH-2568] - Hibernate javadoc overview refering wrong classes and packages
+
+
+Changes in version 3.2.4.sp1 (2007.05.18)
+-------------------------------------------
+
+** Bug
+ * [HHH-2605] - Since 3.2.4 no value specified for row id
+ * [HHH-2613] - LockMode.FORCE on non versioned entity leads to NPE
+
+
+Changes in version 3.2.4 (2007.05.09)
+-------------------------------------------
+
+** Bug
+ * [HHH-511] - reattach object from same session
+ * [HHH-2316] - org.hibernate.cache.CacheKey.equals() can cause PropertyAccessException to be thrown
+ * [HHH-2553] - New LoadContexts Implementation causing possible performance degradation
+ * [HHH-2602] - instrumented many-to-one problem with aggressive release
+
+** Deprecation
+ * [HHH-2603] - Deprecate the Session.connection() method
+
+** Improvement
+ * [HHH-2549] - Warn users explicitly about schemaexport and schemaupdate does not support annotations
+
+** New Feature
+ * [HHH-1] - Optimize Hibernate for the bulk insertion of related entities
+
+** Patch
+ * [HHH-2301] - Identity generator with custom insert SQL broken in 3.2 (Scott Rankin and Gail Badner)
+ * [HHH-2336] - paremeterizable and typedef-able UserCollectionType (Holger Brands)
+ * [HHH-2580] - Performace: Too many lookups of WAS extended transaction support (Jesper Udby)
+
+
+Changes in version 3.2.3 (2007.04.02)
+-------------------------------------------
+
+** Bug
+ * [HHH-2376] - Query with fully qualified entity class fails
+ * [HHH-2392] - LockModes referencing non-root joined-subclass class in HQL/Criteria
+ * [HHH-2393] - Generated properties leave open ResultSet on Batcher to be closed on transaction completion
+ * [HHH-2397] - hilo generator can generate negative numbers because of arithmetic overflow
+ * [HHH-2469] - ArrayIndexOutOfBoundsException during update by rowid
+ * [HHH-2476] - PersistentMap.put() incorrect on uninitialized, non-extra-lazy map
+ * [HHH-2481] - Big memory leak in the use of CGLIB
+ * [HHH-2499] - incorrect assertion failure relating to generated property values
+ * [HHH-2513] - Abusive WARN logged during deserialization of replicated SessionFactory
+ * [HHH-2521] - Fix cascading of merge across component properties
+ * [HHH-2532] - update/delete executeUpdate() causes problems with JBossCache (at least in opt-locking setups)
+
+** Improvement
+ * [HHH-2495] - encapsulate the notion of state pertaining to processing a result set
+ * [HHH-2534] - better error message for illegal 'collection dereference' in HQL query
+ * [HHH-2535] - Change Cache' Cache71Dialect so that sequence support returns false
+
+** New Feature
+ * [HHH-2471] - create a set of "enhanced" generators
+ * [HHH-2500] - apply Terradata certification results
+
+** Patch
+ * [HHH-2367] - InformixDialect uses wrong data type
+ * [HHH-2489] - SQL comments for HQL bulk operations
+
+
+Changes in version 3.2.2 (2007.01.24)
+-------------------------------------------
+
+** Bug
+ * [HHH-1471] - If the 'generated' attribute is set to 'insert' or 'always' on the property of a component it is ignored and the value is not read from the database.
+ * [HHH-1646] - Bad code in FastClass.equals
+ * [HHH-1889] - LockMode.UPGRADE not applied in all cases for SQL Server / Sybase
+ * [HHH-2112] - ClassCastException in StatefulPersistenceContext.getCachedDatabaseSnapshot(...)
+ * [HHH-2221] - MySQL temp table DDL and isolation
+ * [HHH-2238] - SQLQuery executeUpdate doesn't respect Query.setFlushMode()
+ * [HHH-2251] - Settings build unnecessary in schemaupdate/schemavalidate
+ * [HHH-2257] - Query.iterate() results differ from Query.list() 2
+ * [HHH-2259] - autoflush and autoclose not longer occur in JTA environment with hibernate 3.2
+ * [HHH-2264] - NPE when NamedQuery contains space before variable name
+ * [HHH-2274] - Collection ordering when many to many order by is used is not respected
+ * [HHH-2275] - Mapping a composite element as a map key using formulas can lead to AOOBE
+ * [HHH-2284] - HQL: selecting components inside components doesn't work
+ * [HHH-2291] - collection based on property-ref not handled correctly during reattch
+ * [HHH-2292] - merge detached instance fails to persist collection changes in case of bare collection reference
+ * [HHH-2356] - NullableType.toString(Object) should account for nulls
+ * [HHH-2366] - Changing a component's value does not trigger an update during flush
+ * [HHH-2378] - replicate() of non-versioned entiy can result in wrong value for version in entity cache
+
+** Improvement
+ * [HHH-1851] - relax special handling of 'id' property
+ * [HHH-2130] - SQLQuery does not autoflush all entities used in the query
+ * [HHH-2193] - Introduce a flag to avoid checking NamedQuery at startup
+ * [HHH-2242] - Consider Allowing Optimistic Lock Strategies other than 'Version' with joined-subclass
+ * [HHH-2250] - Create an appropriate error message if Query.setEntity is passed a NULL value
+ * [HHH-2282] - PersistentClass property lookups do not properly account for embedded composite identifiers
+ * [HHH-2286] - dialect informational metadata
+ * [HHH-2372] - Allow tooling to create Settings via SettingsFactory without contacting the db
+
+** New Feature
+ * [HHH-2246] - No way to specify CACHE_PROVIDER_CONFIG in HibernateServiceMBean
+
+** Patch
+ * [HHH-2300] - Updated dialect for H2 database engine
+ * [HHH-2371] - enhancements to C3P0ConnectionProvider
+
+** Task
+ * [HHH-2032] - update c3p0 to 0.9.1
+
+
+
+Changes in version 3.2.1 (2006.11.16)
+-------------------------------------------
+
+** Bug
+ * [HHH-939] - 'class' property in HQL results in incorrect SQL for joined-subclass
+ * [HHH-1401] - session.merge() executes unnecessary updates when one-to-many relationship is defined.
+ * [HHH-1460] - Inconsistent behavior when using Session.get() with multiple subclasses
+ * [HHH-1564] - deleting versioned object with collection leads to unecessary update
+ * [HHH-1629] - SchemaUpdate/validator doesn't listen to quoting
+ * [HHH-1631] - Missing table in SQL from clause that is referenced in where clause when using joined subclass
+ * [HHH-1651] - hibernate does not find an existing sequence from an Oracle database
+ * [HHH-1663] - <any/> with collection will produce "AssertionFailure: collection was not processed by flush()"
+ * [HHH-1737] - Add a ConnectionWrapper interface to allow access to the underlying connection from a BorrowedConnectionProxy
+ * [HHH-1756] - Proxy objects are not removed from the BatchFetchQueue during a session evict
+ * [HHH-1774] - Component parameters bound incorrectly
+ * [HHH-1921] - "dirty, but no dirty properties" thrown when Interceptor resets properties.
+ * [HHH-1986] - javassist throws InvocationTargetException instead of original checked Exception
+ * [HHH-2027] - merge listener over-writes Interceptor changes to component state for a transient entity
+ * [HHH-2044] - DefaultMergeEventListener.entityIsDetached call StaleObjectStateException with wrong identifier
+ * [HHH-2082] - UpdateTimestampsCache.isUpToDate returns before checking all spaces
+ * [HHH-2108] - cacheable files broken
+ * [HHH-2138] - merge with bidirectional one-to-one may fail
+ * [HHH-2145] - set.retainAll calling set.addAll
+ * [HHH-2174] - Wrong log message in SessionImpl.afterTransactionCompletion(...)
+ * [HHH-2199] - Unique constraints on nullable columns should not be generated with unique-key is used and supportsNotNullUnique=false
+ * [HHH-2202] - Clearing the connection warnings even when log is > WARN to workaround a Sybase issue
+ * [HHH-2206] - SessionImpl tries to deserialize itself in an incorrect order
+ * [HHH-2207] - Suggested fix for HQL - MySQL setMaxResults issue
+ * [HHH-2226] - org.hibernate.hql.ast.tree.FromElementType contains warning log message that should be debug instead
+ * [HHH-2229] - Performance issue with fix for HHH-1293, CGLIBLazyInitializer may be slower for certain Java classes
+ * [HHH-2236] - Lazy property + setReadOnly + Instrumented classes results in NullPointerException when accessing lazy property
+
+** Improvement
+ * [HHH-2037] - provide Query.setProperties(Map)
+ * [HHH-2042] - Typo in FlushMode.MANUAL Javadoc
+ * [HHH-2057] - Add "remove" cascading style to CascadeStyle for XML mappings
+ * [HHH-2127] - Document <filter-def condition="defaultCondition"> and <filter-def>defaultCondition
+ * [HHH-2135] - Hibernate Deserialization: In org.hibernate.type.SerializableType the code makes a test for the return of a null object by simply testing the object as to whether or not it is null.
+ * [HHH-2185] - introduce setting to control cglib caching of classes
+ * [HHH-2203] - Make Post*Events extend AbstractEvent
+ * [HHH-2208] - Table schema use in DatabaseMetadata
+ * [HHH-2209] - ehcache.jar is old and does not contain the SingletonCacheProvider which are advised in exception messages
+ * [HHH-2217] - Collection write methods and dirtying the collection
+
+** New Feature
+ * [HHH-2205] - Dialect for Intersystems' Cache SQL 2007.1
+
+** Patch
+ * [HHH-1767] - read-only cache for immutable collection causes unnecessary warning
+
+** Task
+ * [HHH-2219] - Upgrade to Javassist 3.4
+
+
+Changes in version 3.2.0.ga (16.10.2006)
+-----------------------------------------
+(retag of 3.2.0.cr5 (2006.10.16))
+
+Changes in version 3.2.0.cr5 (04.10.2006)
+-------------------------------------------
+
+** Bug
+ * [HHH-1668] - PersistentSet write methods mark collection as dirty even if entry is not written
+ * [HHH-1714] - Session.get() behavior
+ * [HHH-1891] - Since rc3 deprecation Warning: The syntax 'TYPE=storage_engine' is deprecated and will be removed in MySQL 5.2.
+
+** Improvement
+ * [HHH-2093] - PERSIST_ON_FLUSH ineffective for recursive object graphs
+ * [HHH-2103] - Rolling back 'SELECT is mandatory' on JPA strict compliance
+
+** Task
+ * [HHH-1931] - verify that the instrument tasks actually work
+
+
+Changes in version 3.2.0.cr4 (24.08.2006)
+-------------------------------------------
+
+** Bug
+ * [HHH-1293] - java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
+ * [HHH-1677] - optimistic-lock="dirty|all" is ignored at delete time
+ * [HHH-1710] - persistent collections with property-ref to secondary tables cannot be joined in HQL
+ * [HHH-1713] - AbstractEntityPersister causes an exception when a row in a joined table is missing with fetch="select"
+ * [HHH-1740] - Build-time instrumentation breaks lazy="proxy"
+ * [HHH-1750] - Exception ORA-01000 too many open cursors by generated="insert"
+ * [HHH-1806] - No Dialect mapping for JDBC type: 3
+ * [HHH-1848] - A session.lock generates a query with a version column in a joined subclass which does not exist
+ * [HHH-1892] - finish HHH-1789 for ordered and sorted collections
+ * [HHH-1898] - With hibernate 3.2.0-cr3 there is an hql parsing error on a one-to-one relation
+ * [HHH-1924] - ForeignKeys: TransientObjectException is thrown without a message because of a wrong bracket in the code
+ * [HHH-1927] - persist() and then merge() not handled correctly for multiple entity instances representing the same logical state
+ * [HHH-1937] - Proxy creation failure leads to NPEs
+ * [HHH-1943] - PersistenceContext not checked to see whether the associated entity is transient or not
+ * [HHH-1944] - generated subqueries and jpaql compliance (derived select clause) check
+ * [HHH-1947] - OF part of MEMBER OF is optional
+ * [HHH-1948] - Query Idetification variables are case insensitive in JPA
+ * [HHH-1949] - having trim(BOTH from c.name) translated into having ltrim(rtrim(BOTH)) on DB2
+ * [HHH-1954] - Proxies are never unassociated (evicted) from a session
+ * [HHH-1958] - session.lock(LockMode.FORCE) can lead to NPE
+ * [HHH-1963] - meta inheritance broken
+ * [HHH-1992] - Some cascade actions should not trigger a property access on lazy properties
+ * [HHH-2001] - javaassist does not setup the proper protection domain thus does not work with signed/secured deployments such as webstart
+ * [HHH-2015] - where= does not set parenthesis leading to unexpected query when multiclause are used
+ * [HHH-2017] - locate function defined on Oracle9Dialect is incorrect
+ * [HHH-2022] - property names beginning with underscores cause Hibernate to generate invalid aliases
+
+** Improvement
+ * [HHH-1470] - Enhance Hibernate-Mapping DTD Definition of type element
+ * [HHH-1934] - logging NonUniqueObjectException and WrongClassException
+ * [HHH-1941] - Be more specific about x not found and invalid mapping exceptions to allow tools to tell about it
+ * [HHH-1968] - unify bytecode instrumentation
+ * [HHH-1980] - disallow the mapping combination of <version/> and optimistic-lock
+ * [HHH-2005] - more standard build script
+ * [HHH-2023] - performance optimization of JTATransactionFactory.isTransactionInProgress()
+
+** Patch
+ * [HHH-1271] - When using Stored Procedure for update or delete, the check is not done correctly.
+
+** Task
+ * [HHH-1931] - verify that the instrument tasks actually work
+
+
+Chages in version 3.2 cr3 (2006.07.06)
+-------------------------------------------
+
+** Bug
+ * [HHH-1452] - Native SQL query is missing join if entity includes many-to-one on secondary table
+ * [HHH-1507] - one-to-one can have formula or meta but not both of them.
+ * [HHH-1552] - Error when using ?1 and parameterList
+ * [HHH-1586] - ClassCastException in CollectionType.toLoggableString if using CustomCollectionType
+ * [HHH-1732] - EhCache.toMap still assumes Serializable objects
+ * [HHH-1734] - Connection leak when using hilo strategy in SE environment
+ * [HHH-1741] - Bug in reference documentation
+ * [HHH-1746] - NullPointerException at IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:195
+ * [HHH-1748] - Setting a comment that contains a single quote on a query results in an unintuitive exception
+ * [HHH-1763] - Bug in InputStream org.hibernate.util.ConfigHelper.getResourceAsStream(String resource)
+ * [HHH-1791] - property update="false" ignored since 3.2.0.cr2
+ * [HHH-1816] - serializing session from a named session factory to a different vm broken
+ * [HHH-1822] - flushing entity linked to transient instance (non cascaded) should always fail
+ * [HHH-1828] - registering a transaction marked for Rollback is illegal
+ * [HHH-1833] - Not Generating HibernateException
+ * [HHH-1838] - Wrong SQL generated for hql query on "any" relation
+ * [HHH-1855] - booleans not properly handled in assignment clause of UPDATE statements
+ * [HHH-1858] - wrong sql generated against many-to-any association table
+ * [HHH-1871] - query type autodiscovery assume wrong column when mixing entities and scalars
+
+** Deprecation
+ * [HHH-1792] - Callable update/insert/delete statements should not force rowcount out parameter
+
+** Improvement
+ * [HHH-1617] - Check the second-level cache before adding a PK to a batch fetch
+ * [HHH-1773] - Typo in ImprovedNamingStrategy
+ * [HHH-1779] - Allow Session.remove() on transient object
+ * [HHH-1789] - improve efficiency of collection initialization from L2 cache hits
+ * [HHH-1795] - default cache provider to NoCacheProvider
+ * [HHH-1796] - TreeCache based providers and Fqn
+ * [HHH-1800] - session.get() / load() should raise exception when the id is of the wrong type
+ * [HHH-1818] - remove() should force subsequent contains() calls to return false
+ * [HHH-1831] - Batch loading the same EntityKey (one side of manytoone ) more than once
+ * [HHH-1861] - More complete component handling in HQL
+ * [HHH-1881] - introduce LoggableUserType interface
+
+** New Feature
+ * [HHH-1709] - Be able to raise ENFE rather than LIE in proxies
+ * [HHH-1727] - Add a SQLFunctionRegistry
+ * [HHH-1817] - Introduce setting for JPA-QL strict compliance
+ * [HHH-1826] - Built-in type for char[] -> VARCHAR Byte[] and Character[]
+
+** Patch
+ * [HHH-1558] - Dialect for new database engine H2
+ * [HHH-1847] - QBE 'like' clause with backslashes don't work with MySQL
+
+** Task
+ * [HHH-1839] - rename FlushMode.NEVER -> FlushMode.MANUAL
+
+
+Changes in version 3.2 cr2 (2006.05.05)
+-------------------------------------------
+
+** Bug
+ * [HHH-1114] - The first (HSQL) Hibernate Application doesn't work as expected due to lack of database shutdown
+ * [HHH-1175] - Exception when loading inheritance mapping in single file
+ * [HHH-1560] - PropertiesHelper.resolvePlaceHolders() fails with non-String values in System properties
+ * [HHH-1620] - Errors on max_lo <=1 boundaries
+ * [HHH-1625] - Hibernate.isPropertyInitialized() returns false on instrumented transient object
+ * [HHH-1648] - Exception while resuming a transaction is silently eaten
+ * [HHH-1674] - Configuration serialization error: filterDefinitions map not serializable
+ * [HHH-1695] - subsequent calls to non-existent proxy causes NPE
+
+** Improvement
+ * [HHH-1266] - StatelessSession can implement refresh
+ * [HHH-1414] - many-to-many and metadata order-by based on column from the target table
+ * [HHH-1477] - Improve naming strategy for ANN-195
+ * [HHH-1538] - aggregations functions in EJBQL queries does not return the appropriate types
+ * [HHH-1670] - Update EhCache and EhCache provider to support EhCache 1.2
+ * [HHH-1704] - Deduplicate unique constraints generation sharing the same column(s)
+
+** New Feature
+ * [HHH-870] - support SQL updates in named queries
+ * [HHH-1591] - Replace LazyInitializationException by EntityNotFoundException
+ * [HHH-1719] - Provide a ClassTransformer interface to the BytecodeProvider
+
+
+Changes in version 3.2 cr1 (2006.03.27)
+-------------------------------------------
+
+** Bug
+ * [HHH-1453] - Broken exception handling in NullableType
+
+** Improvement
+ * [HHH-227] - remove reflection optimizer
+ * [HHH-587] - Make ResultTransformer available for all query methods
+ * [HHH-1588] - delay inserts for insert-generated-identifiers outside transaction
+ * [HHH-1590] - redesign how PostInsertIdentifierGenerators are handled at insertion
+ * [HHH-1592] - allow SelectGenerator to use a defined natural-id (if one)
+
+** New Feature
+ * [HHH-332] - create ability to add resulttransformer to HQL query
+ * [HHH-1179] - support inline sequence id generation on Oracle using RETURNING clause
+
+
+Changes in version 3.2 alpha2 (2006.03.15)
+-------------------------------------------
+
+** Bug
+ * [HHH-535] - properties element causes exception in interface/abstract class
+ * [HHH-1325] - ArrayOutOfBounds expected in DatabaseMetadata.isTable when specifing schema
+ * [HHH-1435] - many-to-one lazy seems to be broken in 3.1.x
+ * [HHH-1531] - NPE with many-to-many and property-ref
+ * [HHH-1546] - generated version properties fail with multiple actions per flush
+
+** Improvement
+ * [HHH-1540] - Better Error Feedback In CollectionEntry.postFlush(PersistentCollection)
+ * [HHH-1555] - ConnectionReleaseMode.AFTER_STATEMENT and flushes
+ * [HHH-1559] - introduce TransactionFactory.isTransactionInProgress to facilitate EJB3 joinTransaction handling
+
+
+Changes in version 3.2 alpha1 (2006.02.28)
+-------------------------------------------
+
+** Bug
+ * [HHH-687] - Exception QuerySyntaxError not really serializable
+ * [HHH-1236] - Remove static reference to classloader, to avoid memory leak at webapp reload
+ * [HHH-1287] - Problem with WAS ExtendedJTATransaction not available when using MDB
+ * [HHH-1419] - Update + Exists doesn't seem to work
+ * [HHH-1445] - SchemaUpdate closes shared ConnectionProvider
+ * [HHH-1464] - QueryException from Query.getReturnAliases when query uses "fetch"
+ * [HHH-1486] - Concurrent access issues with both SoftLimitMRUCache and SimpleMRUCache
+ * [HHH-1508] - Session.createQuery() should not flush the session
+
+** Improvement
+ * [HHH-1411] - Collection fetches and DISTINCT
+ * [HHH-1412] - Collection fetches and firstResult/maxRows
+ * [HHH-1416] - LockMode.FORCE to implement EJB3 LockModeType.WRITE
+ * [HHH-1457] - support new optimisitc locking capabilities of JBossCache
+ * [HHH-1466] - better handling of Antlr exceptions
+ * [HHH-1516] - support DataDirect standard jdbc stored procedures
+ * [HHH-1518] - Guarentee LockMode behaviors
+ * [HHH-1520] - with clause with implied joins within an explicit join
+ * [HHH-1526] - Improved DTDEntityResolver
+
+** New Feature
+ * [HHH-1251] - Avoid replicating the clearing of TreeCache on SessionFactory..close()
+ * [HHH-1410] - FlushMode.AUTO -> COMMIT when outside a transaction
+ * [HHH-1447] - pluggable bytecode libraries
+
+
+Changes in version 3.1.2 (01.27.2006)
+-------------------------------------------
+
+** Bug
+ * [HHH-73] - Statistics for HQL queries use pre-processed query string
+ * [HHH-1306] - HQL parsing problem with join fetching of arrays/collections of values
+ * [HHH-1370] - Warning in hibernate-mapping-3.0.dtd
+ * [HHH-1371] - MappingException is thrown when the same column is referenced with different case
+ * [HHH-1386] - Numeric (long) literals not properly handled by HQL parser
+ * [HHH-1390] - Session.isOpen() throws exeception when the session is closed with ThreadLocalSessionContext
+ * [HHH-1391] - Invalid parameter index SQLException when using named parameters after positional parameters
+ * [HHH-1392] - Proxies cannot be serialized after session is closed
+ * [HHH-1398] - extends and entity-names broken with mapping-level package attribute
+ * [HHH-1407] - return-join broken for entity collections
+
+** Improvement
+ * [HHH-1364] - Defensive check of isClosed when obtaining a connection from ConnectionManager
+ * [HHH-1367] - warn level log "this operation breaks ==" may be disturbing
+
+** New Feature
+ * [HHH-1372] - Support for MySQL5 new varchar length
+
+** Patch
+ * [HHH-1005] - Criteria LEFT JOIN capability when adding Order to associations
+
+** Task
+ * [HHH-1373] - Document update versioned
+
+
+Changes in version 3.1.1 (01.13.2006)
+-------------------------------------------
+
+** Bug
+ * [HHH-853] - DML-style HQL queries and associations
+ * [HHH-1281] - FORWARD_ONLY ScrollableResults#next() throw GenericJDBCException
+ * [HHH-1286] - Set entity in HQL query without prefix -> incorrect SQL
+ * [HHH-1308] - Session.createFilter(...).iterate() results in bogus column names for result set extraction
+ * [HHH-1314] - float/double literals not sent to the database correctly
+ * [HHH-1316] - SchemaUpdate : java.sql.SQLException: You cannot commit during a managed transaction!
+ * [HHH-1328] - org.hibernate.util.SimpleMRUCache keeps a soft reference to the cache key, so cached values get collected prematurely
+ * [HHH-1336] - ForeignGenerator does not handle transient entities with an entity-name properly
+ * [HHH-1337] - Mapped <component> generated column names incorrect with ImprovedNamingStrategy
+ * [HHH-1349] - HQL delete statement problem due to oracle lacking table aliases in delete clause
+ * [HHH-1361] - creating temporary table for bulk delete will commit current transaction in managed environment such as J2EE
+
+** Improvement
+ * [HHH-1019] - Native SQL return-property mapping doesn't support dot-syntax in return-property for components
+ * [HHH-1290] - Defensive checking of session status
+ * [HHH-1302] - query.getReturnTypes inconsistent
+ * [HHH-1304] - better handling of borrowed connections in non-ON_CLOSE release semantics
+ * [HHH-1309] - schemaupdate does not handle TableHiLoGenerator
+ * [HHH-1339] - empty property name in mapping file gives imcomprehensible error message
+ * [HHH-1344] - ANSI-SQL trim function for SQLServer
+ * [HHH-1345] - ANSI-SQL mod function for SQLServer
+ * [HHH-1346] - ANSI-SQL bit_length function for SQLServer
+ * [HHH-1351] - <return-scalar name="blah"/> should be possible
+ * [HHH-1360] - set autodiscovery flag for SQLQueries when resultsetmappings are used
+
+
+Changes in version 3.1 (12.12.2005)
+-------------------------------------------
+
+** Bug
+ * [HHH-849] - Cartesian product + implicit joins
+ * [HHH-1065] - user provided connection not usable by default due to agressive release changes
+ * [HHH-1101] - associations join fetched in HQL without owner being selected
+ * [HHH-1133] - Comparators, defined for collections in mapping files, are not set
+ * [HHH-1149] - NPE flushing reattached entity w/ non-mutable natural-id
+ * [HHH-1170] - HQL 'cast' function doesn't work with MySQL 4 when casting to string
+ * [HHH-1187] - Cannot delete a object having a delete-orphan collection when user_rollback_id is set
+ * [HHH-1191] - HQL fails backward compatibility using classic translator
+ * [HHH-1194] - hql delete statements with joined-subclass hierarchies with a mapped where attribute at the root
+ * [HHH-1206] - Mappings.TableDescription is not serializable
+ * [HHH-1212] - mismatch in entity-modes defined in DTD and EntityMode class
+ * [HHH-1227] - ClassCastException on DOM4J replicate of Calendar property
+ * [HHH-1239] - BinaryArithmeticOperatorNode.getDataType() does not properly handle date/time arithmetic
+ * [HHH-1240] - Track connection leakage in JDBCContext.afterTransactionCompletion()
+ * [HHH-1245] - Calling the Session should register it with the current JTA txn.
+ * [HHH-1254] - Serialization of Sessions using JDBCTransactions with auto-flush/auto-close
+
+** New Feature
+ * [HHH-1222] - Autodiscover scalar types in native-sql
+ * [HHH-1243] - allow placeholders to system properties in config properties
+ * [HHH-1244] - Support for MySQL5 stored procedures
+ * [HHH-1260] - Configuration.mergeProperties()
+
+** Task
+ * [HHH-1066] - Upgrade CGLIB to fix proxy memory leak
+ * [HHH-1242] - upgrade ANTLR to 2.7.6rc1
+
+** Improvement
+ * [HHH-860] - insert ... select ... and version numbers
+ * [HHH-926] - TypeDef should be global
+ * [HHH-1138] - No ConstraintName when using PostgreSQL
+ * [HHH-1144] - Implement naming convention for temporary test failures
+ * [HHH-1153] - PropertiesHelper fails reading primitive values from hibernate-mapping when doc has whitespace
+ * [HHH-1182] - Access to filter metadata
+ * [HHH-1183] - Getting sql "plan" for DML operations
+ * [HHH-1197] - Support for HQL delete on MaxDB
+ * [HHH-1198] - post-insert event pass the entity wo the id field filled when the generator is identity
+ * [HHH-1213] - make JACC event listeners auto configurable (through initialize(Configuration))
+ * [HHH-1215] - Added support for LVARCHAR in InformixDialect
+ * [HHH-1218] - Add concat() function support to SAPDBDialect
+ * [HHH-1255] - ThreadLocalSessionContext and Session serialization
+
+** Patch
+ * [HHH-967] - executeUpdate on StatelessSession
+ * [HHH-1172] - Missing configuration templates for the new MimerSQLDialect
+
+** Deprecation
+ * [HHH-1229] - deprecate ability for entities to not define identifier properties
+
+
+Changes in version 3.1 rc3 (17.11.2005)
+-------------------------------------------
+
+** Bug
+ * [HHH-755] - Setter / Getter for property gDate are wrong
+ * [HHH-764] - XML mapping
+ * [HHH-1034] - The connection is closed *outside* the JTA transaction in TransactionHelper
+ * [HHH-1062] - java:comp/UserTransaction not correct for JBoss
+ * [HHH-1064] - Exception using JTATransaction in WebSphere 6
+ * [HHH-1069] - Unnecessary commas generated in select with left outer joins
+ * [HHH-1075] - New parser "not exists" command bug
+ * [HHH-1077] - Typo in docs: "equiped"
+ * [HHH-1080] - HQL delete fails on entities with where-fragments using operators other than '='
+ * [HHH-1081] - missing parens in example code for Criteria Associations
+ * [HHH-1084] - incorrect method name "sql" in Restrictions example, should be "sqlRestriction"
+ * [HHH-1091] - Can't write transparent CurrentSessionContext for BMT
+ * [HHH-1098] - Patch for build.sh to be able to build latest version on linux
+ * [HHH-1106] - HQL "not in" generatad wrong SQL
+ * [HHH-1111] - JDBCTransaction.rollback() results in a call to Interceptor.beforeTransactionCompletion()
+ * [HHH-1128] - Column alias clashes under certain circumstances
+ * [HHH-1146] - latest cvs(11/10/05) hibernate3 issue with classic query
+ * [HHH-1156] - StatefulPersistenceContext not serializable when property-ref is used
+ * [HHH-1160] - Incorrect use of getGeneratedKey() for Oracle
+
+** New Feature
+ * [HHH-449] - korean hibernate reference manual
+ * [HHH-1129] - use expected-type in 'untyped' Query.setParameter()
+
+** Improvement
+ * [HHH-221] - Proxy for one-to-one with property-ref
+ * [HHH-844] - move parameter "bookkeeping" into QueryTranslator
+ * [HHH-1051] - "Compiled" native SQL queries are not cached
+ * [HHH-1061] - import.sql should allow more human readable and usable files
+ * [HHH-1078] - <dynamic-component> requires type on property
+ * [HHH-1120] - Make NamingStrategy to work nicely with HA and EJB3 naming strategy
+ * [HHH-1142] - added getSelectSequenceNextValString() and getCurrentTimestampSelectString() to TimesTenDialect
+
+** Patch
+ * [HHH-1063] - support for 'locate' function in SQLServer and Sybase dialects
+ * [HHH-1090] - Allow subqueries on criteria to obtain non-string results
+ * [HHH-1095] - Hibernate takes incorrect HasCode when a lot of CompositeKeys and Lazy loading is involved
+ * [HHH-1103] - finalize method filter for proxies
+ * [HHH-1136] - more meaningful AssertionFailure message in org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(...)
+
+
+Changes in version 3.1 rc2 (17.10.2005)
+-------------------------------------------
+** Bug
+ * [HHH-1045] - Example contains inner classes that aren't serializable
+ * [HHH-1055] - optimistic-lock is not inherited from class to subclass et.al.
+
+** Improvement
+ * [HHH-702] - auto detect aliasing for collection properties (coll.key, coll.id etc.)
+ * [HHH-1038] - make 'auto' the default for hibernate.connection.release_mode
+ * [HHH-1042] - determine "expected type" of parameters during HQL parsing
+
+
+Changes in version 3.1 rc1 (07.10.2005)
+-------------------------------------------
+** Bug
+ * [HHH-528] - component.manyToOne.id in HQL causes join
+ * [HHH-871] - Configuration.setListener(String type, Object listener) throws ClassCastException
+ * [HHH-873] - referencing raw HQL FromElement alias outide the from clause of update and delete statements generates incorrect sql
+ * [HHH-876] - PreparedStatement being closed before being executed by AbstractBatcher
+ * [HHH-884] - SchemaExport does not propagate parent indexes to <union-subclass> tables
+ * [HHH-887] - Aggressive release and Session.connection()
+ * [HHH-893] - custom tuplizer are not instantiated for components
+ * [HHH-905] - $PlaceHolder$ remains in generated SQL when filter is enabled
+ * [HHH-907] - optimistic-lock="false" for timestamped object results in SQLException: Invalid column index
+ * [HHH-908] - CLONE -NullPointerException when using BigInteger in a query
+ * [HHH-911] - CGLIBLazyInitializer and Exceptions
+ * [HHH-913] - NPE in CMTTransaction since javax.transaction.Transaction is never set
+ * [HHH-918] - impossible to move objects to another session
+ * [HHH-924] - Useless OracleErrorCodeConverter (and possibly others)
+ * [HHH-932] - HQL UPDATE and <union-subclass>
+ * [HHH-946] - QuerySyntaxException might not be serializable
+ * [HHH-964] - ORA-00936 with joined subclass / Oracle
+ * [HHH-986] - Need to check Thread.currentThread().getContextClassLoader() in ConfigHelper
+ * [HHH-991] - Cannot use comparator class
+ * [HHH-1000] - varchar(xxx char) not supported on Oracle8i
+
+** New Feature
+ * [HHH-950] - interface for SessionFactory.getCurrentSession() handling
+
+
+** Improvement
+ * [HHH-608] - update HSQLDialect for HSQL 1.8 sequence support
+ * [HHH-889] - Add read-only cache-mode comment in <query and <sql-query
+ * [HHH-898] - OracleDialect UTF8 varchar2
+ * [HHH-909] - Onquoted primary key in IncrementGenerator
+ * [HHH-988] - generated="never|insert|always"
+ * [HHH-989] - add discussion of implicit and explcit joins
+ * [HHH-1011] - Make disconnect/reconnect of a Session implicit
+
+** Patch
+ * [HHH-994] - Sybase/SQLServer support for temporary tables
+
+
+Changes in version 3.1 beta 3 (13.09.2005)
+-------------------------------------------
+** Bug
+ * [HHH-528] - component.manyToOne.id in HQL causes join
+ * [HHH-871] - Configuration.setListener(String type, Object listener) throws ClassCastException
+ * [HHH-873] - referencing raw HQL FromElement alias of update and delete statements
+ * [HHH-876] - PreparedStatement being closed before being executed by AbstractBatcher
+ * [HHH-884] - SchemaExport does not propagate parent indexes to <union-subclass> tables
+ * [HHH-887] - Aggressive release and Session.connection()
+ * [HHH-893] - custom tuplizer are not instantiated for components
+ * [HHH-905] - $PlaceHolder$ remains in generated SQL when filter is enabled
+ * [HHH-907] - optimistic-lock="false" for timestamped object results in SQLException: Invalid column index
+ * [HHH-908] - NullPointerException when using BigInteger in a query
+ * [HHH-911] - CGLIBLazyInitializer and Exceptions
+ * [HHH-913] - NPE in CMTTransaction since javax.transaction.Transaction is never set
+ * [HHH-918] - impossible to move objects to another session
+ * [HHH-924] - Removed ErrorCodeConverters
+ * [HHH-946] - QuerySyntaxException might not be serializable
+
+** Improvement
+ * [HHH-898] - OracleDialect UTF8 varchar2
+ * [HHH-909] - Unquoted primary key in IncrementGenerator
+
+
+Changes in version 3.1 beta 2 (16.08.2005)
+-------------------------------------------
+** Bug
+ * [HHH-477] - Boolean discriminators generate invalid SQL for PostgreSQL dialect
+ * [HHH-480] - SchemaExportTask ignores some properties not defined in hibernate.properties
+ * [HHH-615] - SchemaExport outputFile ignores ant's basedir
+ * [HHH-770] - hql query execution generates invalid SQL
+ * [HHH-779] - Assertion failure occured with Hibernate 3 saving objects
+ * [HHH-781] - SimpleExpression ignorecase regression
+ * [HHH-799] - merge() and embedded composite identifiers
+ * [HHH-801] - subselect fetch and named parameters
+ * [HHH-802] - querying "mapped" composite identifiers
+ * [HHH-803] - no version increment from delayed collection adds
+ * [HHH-805] - Session.getStatistics().getEntityCount() throws UnsupportedOperationException
+ * [HHH-819] - Firebird CONCAT SQL function
+ * [HHH-821] - query by natural-id cache is not update when object is inserted or deleted
+ * [HHH-822] - <key-property> will actually pick up <type> tags if it were allowed by the DTD
+ * [HHH-825] - ReadWrite-Cache issues NullPointerException after modification of an array
+ * [HHH-839] - Session.refresh not working for custom 'Load' SQL
+ * [HHH-849] - Cartesian product + implicit joins
+ * [HHH-854] - Class with mapped composite id can't have subclasses
+ * [HHH-858] - Autocommit status inconsistent in connections created by DriverManagerConnectionProvider
+ * [HHH-863] - Hibernate generates "notExists" instead of "not exists"
+ * [HHH-868] - Missing parens after / or -
+
+** New Feature
+ * [HHH-35] - add attribute haltonerror to schemaexport Ant task
+ * [HHH-182] - Mimer SQL Dialect for Hibernate 3
+ * [HHH-704] - Statistics for optimistic lock failures
+ * [HHH-725] - Allow hooks into all executed sql by a session
+ * [HHH-783] - collection lazy="extra"
+ * [HHH-818] - Optimisitc locking using database current timestamp
+ * [HHH-828] - session.getTransaction()
+ * [HHH-829] - <cache include="all|non-lazy" ... />
+ * [HHH-831] - allow database generated property values
+ * [HHH-832] - allow database generated property values for versioning
+ * [HHH-838] - Transaction.setTimeout()
+ * [HHH-840] - allow definition of "auxiliary" database objects in mapping
+ * [HHH-846] - Add Intializable interface for events
+ * [HHH-848] - Validate mappings against JDBC metadata
+ * [HHH-859] - post-commit events
+
+** Improvement
+ * [HHH-133] - schemaexport task: provide independent drop/create output
+ * [HHH-135] - parameterized types can't be used on key-property or ir (possible others)
+ * [HHH-552] - NoopAccessor for HQL-only properties
+ * [HHH-680] - Easier support for doing UserCollectionType's
+ * [HHH-686] - Final classes and classes with private null ctors cause unhelpful NullPointerException
+ * [HHH-754] - Allow HQL DML for implicit polymorphism
+ * [HHH-782] - Avoid unnecessary updates when component property is update='false' but modified
+ * [HHH-786] - Improve lazy options for <one-to-one>
+ * [HHH-791] - Use cascade styles when fetching entities in refresh() and merge()
+ * [HHH-815] - Confusing use of the term "dereference"
+ * [HHH-830] - Improvements to caching lazy properties
+
+** Patch
+ * [HHH-378] - Better LockMode.UPGRADE for DB2 UDB v8.2
+ * [HHH-430] - Improved SizeExpression with greater, lesser, not equals, etc. capabilities
+ * [HHH-735] - SchemaUpdate reads table metadata from wrong schema
+ * [HHH-780] - org.hibernate.proxy.BasicLazyInitializer reflection hotspot
+ * [HHH-864] - Use QUERY_CACHE for sessions with filters to improve performance
+
+
+Changes in version 3.1 beta 1 (21.07.2005)
+-------------------------------------------
+
+** Bug
+ * [HHH-145] - union-subclass and oracle 8i
+ * [HHH-374] - EJB3 example delete query doesn't work in Hibernate.
+ * [HHH-447] - EHCache integration prevents multiple session factories
+ * [HHH-488] - JACCListeners are not working at all
+ * [HHH-564] - missing commas for implicit joins
+ * [HHH-577] - joins within subqueries on dbs supporting ansi-joins result in extraneous commas
+ * [HHH-592] - cast() function doesn't know its returned Hibernate type
+ * [HHH-639] - CGLIB instrumentation of subclasses
+ * [HHH-658] - Bug in Alias Name Generation
+ * [HHH-671] - Firebird support of sequences/generators
+ * [HHH-679] - setLockMode(LockMode.UPGRADE_NOWAIT) does not translate to correct SQL on Oracle
+ * [HHH-688] - Bad implementation in org.hibernate.type.CustomType.stringToObject
+ * [HHH-691] - generated column alias is incorrect if there is a prior relationship and the table column names are similar to the table name
+ * [HHH-694] - NPE when accessing the SLCache stats with TreeCache
+ * [HHH-698] - Exception on EG , trying to change immutable id (natural-id)
+ * [HHH-699] - Incorrect Tablename genetaion when using MySQL Dialect and no Schema definition
+ * [HHH-708] - Restrictions.in could not be used properly on composite-ids
+ * [HHH-709] - ArrayType.replaceElements fails if original.length != target.length
+ * [HHH-718] - HQL "fetch all properties" not working for column level lazy props
+ * [HHH-726] - ConstraintViolationException with primitive collection
+ * [HHH-727] - java.lang.StackOverflowError when cascade="true" on both sides of bidirectional one-to-one association using FK
+ * [HHH-734] - HQL incorrectly parses certain query strings
+ * [HHH-736] - Use of sql functions containing space not supported in filter conditions
+ * [HHH-738] - formula property with select-before-update
+ * [HHH-747] - Order.toSQLString generates incorrect statement
+ * [HHH-748] - component dereferencing in subquery from clauses
+ * [HHH-752] - Typo in 8.5.3 bidirectional one-to-one jjoin table example
+ * [HHH-757] - NullPointerException when using BigInteger in a query
+
+** New Feature
+ * [HHH-595] - HQL insert select
+ * [HHH-597] - Named XML resultsetmappings
+ * [HHH-696] - handle discriminators on HQL insert
+ * [HHH-697] - allow bumping versions in HQL update
+ * [HHH-716] - handle version columns in bulk inserts
+ * [HHH-723] - Need to be able to pass in javax.sql.DataSource in SF creation
+ * [HHH-739] - Order.ignoreCase()
+ * [HHH-741] - select clause subselects
+ * [HHH-742] - Stateless session
+ * [HHH-744] - collection fetching in scroll() via "break processing"
+ * [HHH-768] - <many-to-many property-ref=".."/>
+
+** Improvement
+ * [HHH-14] - Add Session.delete(String entityName, Object entity)
+ * [HHH-295] - cleanup and expose the Tuplizers
+ * [HHH-352] - HQL bulk and cache
+ * [HHH-689] - exclude parens for components outside where-clause
+ * [HHH-743] - {coll.key}, {coll.index}, {coll.element}, etc
+ * [HHH-745] - EJB3 composite PK style
+ * [HHH-749] - Cascade merge() and unidirectional one-to-many
+ * [HHH-750] - use attribute name other than 'type' in dynamic-maps
+ * [HHH-753] - Replace antlr System.exit with QueryException
+ * [HHH-769] - property-ref="foo.bar" to a component property
+ * [HHH-772] - null in maps are handled inconsistently
+ * [TODO-18] - optimistic-lock="all|dirty" with components
+
+
+Changes in version 3.1 alpha 1 (24.06.2005)
+------------------------------------
+** Bug
+ * [HHH-204] - Wrong/uncommon log name in class ...hql ast ErrorCounter
+ * [HHH-241] - HQL lexer doesn't support unicode quoted strings
+ * [HHH-354] - property named "full" breaks HQL queries
+ * [HHH-493] - WARNING: Keyword 'member' is being intepreted as an ident
+ * [HHH-538] - length() function does not work in SQLServerDialect
+ * [HHH-539] - ClassCastException on mapping a property with a formula in a set of composite elements
+ * [HHH-540] - Mapping a one-to-many collection with a non-null foreign key within a component fails on save
+ * [HHH-547] - Cannot commit using UserCollectionType and debug logging
+ * [HHH-548] - many-to-many faulty delete optimization when filter in use
+ * [HHH-554] - Hibernate 3 HQL to SQL FROM Clause Comma Generation Problem
+ * [HHH-558] - HQL doesn't support multi-byte character in class name and property names
+ * [HHH-559] - quoted multi-byte character in HQL is translated into weird character in SQL.
+ * [HHH-565] - delete-orphan generating AssertionFailure
+ * [HHH-566] - The result is not correct in 'createQuery("select new Foor(x,x) from Foo").scroll()'
+ * [HHH-570] - size operator fails on a many to many in HQL
+ * [HHH-571] - JDK 1.3 Compatibility Issue
+ * [HHH-573] - error when merging entity graph has cascade level>2
+ * [HHH-575] - org.hibernate.cache.FilterKey is not Serializable
+ * [HHH-589] - parameterized expression inside function
+ * [HHH-594] - order-by mapping for collections overrides order by in HQL
+ * [HHH-601] - New temporary table feature assumes all persisters are ready
+ * [HHH-614] - SchemaUpdate broken in DB2/400
+ * [HHH-622] - Spelling mistake 'intepreted' in org.hibernate.hql.PARSER warning
+ * [HHH-642] - criterias with projection
+ * [HHH-650] - FilterImpl is Serializable yet FilterDefinition is not
+ * [HHH-657] - Date parse exception using EntityMode.DOM4J
+ * [HHH-666] - JTAHelper.isInProgress( txn.getStatus()) throws NPE when txn null
+
+** New Feature
+ * [HHH-620] - Extra join conditions in HQL
+ * [HHH-640] - short-circuit dirty checking for instrumented classes
+ * [HHH-643] - support mutable="false" for collections
+ * [HHH-645] - Session.setReadOnly()
+ * [HHH-549] - portable to_char() function
+ * [HHH-576] - Hook to pre-process generated select strings in the Dialect
+ * [HHH-662] - Add support for definition of functional composite key ("properties") in joined subclass
+
+** Improvement
+ * [HHH-46] - Allow access to properties that are not joined
+ * [HHH-261] - Stored procedure support for SQLServer dialects
+ * [HHH-351] - multi-table bulk operations
+ * [HHH-574] - improve in naming named-query
+ * [HHH-596] - Auto-detect {..} in native SQL queries
+ * [HHH-641] - create constraints for many-to-one property-ref
+ * [HHH-501] - warn when a final method is tried to be proxied
+ * [HHH-525] - cglib related startup performance
+ * [HHH-557] - Helpful error message for non Serializable classes with a composite-id
+ * [HHH-586] - check immutable natural-ids
+ * [HHH-609] - Adds substr to PostgreSQL dialect
+ * [HHH-618] - documentation bugs
+
+** Patch
+ * [HHH-224] - JDataStore Dialect and updated Testfiles
+ * [HHH-366] - InformixDialect SQLExceptionConverter
+ * [HHH-536] - ImprovedNamingStrategy modifies capitalized column names inappropriately
+ * [HHH-632] - Informix Dialect missing from automatic dialect discovery
+ * [HHH-4] - CachedFile bugfix + configuration + autodetect resource as file
+
+
+Changes in version 3.0.5 (25.5.2005)
+------------------------------------
+
+** Bug
+ * [HHH-516] - Interceptor.onFlushDirty() sometimes not called
+ * [HHH-517] - getDatabaseMajorVersion() not available in JDK 1.3
+ * [HHH-518] - SQL parser does not recognize all whitespace
+ * [HHH-519] - broken SQL when traversing many-to-many to joined <subselect>
+ * [HHH-529] - Bug in merge()
+
+** New Feature
+ * added <natural-id> mapping
+ * [HHH-533] - allow unique-key on <property> and <many-to-one>
+ * [HHH-534] - efficient cache by natural key
+ * support for <comment> on MySQL
+
+** Improvement
+ * [HHH-526] - log "Aggressively releasing JDBC Connection" as DEBUG instead of INFO
+ * various logging improvements
+
+
+Changes in version 3.0.4 (23.5.2005)
+------------------------------------
+
+** Bug
+ * [HHH-452] - UnsavedValueFactory.instantiate does not wrap the Exception it catches
+ * [HHH-456] - Session still holds references to entities after close()
+ * [HHH-457] - Log info for structured second-level cache entries is incorrect
+ * [HHH-466] - Made default for MS SQL dialect definition more flexible
+ * [HHH-473] - Formula can't contain SQL cast keyword
+ * [HHH-484] - Order-by not applied to collections fetched by OuterJoinLoader
+ * [HHH-487] - Possible empty union in UnionSubclassEntityPersister
+ * [HHH-505] - Possible NullPointerException in BigIntegerType
+ * [HHH-507] - Cached List does not show additions
+ * Fixed bugs in subselect fetching
+
+** New Feature
+ * [HHH-455] - Obtain non-intercepted Session by passing an EmptyInterceptor
+ * [HHH-467] - HQL: support for case when then else end IN select clause
+ * [HHH-485] - Support multiple collection join fetches (attention: Cartesian product) in native SQL queries
+ * Added SessionStatistics metric interface
+ * Added support for table and column level <comment> blocks
+ * Added Simplified Chinese translation of reference documentation (Xiaogang Cao)
+
+** Improvement
+ * Any query may now join fetch >1 collection role (attention: Cartesian product)
+ * [HHH-454] - Add 2292 integrityViolationCode to Oracle9Dialect
+ * [HHH-503] - Implemented ViolatedConstraintNameExtracter for HSQLDialect (Frank Grimes)
+
+
+Changes in version 3.0.3 (8.5.2005)
+-----------------------------------
+* fixed bug in HQL for composite key classes which have a property named the same as the owning entity's id property
+* replaced 'connection.aggressive_release' with 'hibernate.connection.release_mode'
+* added ConnectionReleaseMode
+* added eager fetch for any associations with fetch=join, even after a HQL query, or cache retrieval (EJB3)
+* added replicate() isUpdate flag to OnReplicateVisitor, useful for native ids
+* fixed ParameterizedTypes order of initialization
+* fixed bug in DB2Dialect
+* fixed EntityMode.DOM4J creation of duplicate <set> output
+* fixed JDBCException error code handling
+* fixed Criteria Restrictions.isEmpty()/isNotEmpty() when collection is mapped to superclass
+* fixed HQL indexed collections access with no alias
+* fixed HQL aggregate functions on components when "id" property is used
+* fixed issue with non-cascading refresh to collections
+* fixed query-timeout not being applied to bulk HQL (Stephan Fudeus)
+* fixed pessimistic locking with Firebird (Yuichi Sugimura)
+* updated Ant 1.6.3
+* improved validation of sql queries, throw QueryException if addEntity() nor addScalar() was called
+* added automatic dialect detection if no dialect is configured
+* added new tutorial (Michael Gloegl, Christian Bauer)
+
+
+Changes in version 3.0.2 (27.4.2005)
+------------------------------------
+* fixed union operations on PostgreSQL
+* fixed HQL concat() function for Oracle dialect
+* fixed auto-close/auto-flush during getCurrentSession() processing
+* fixed ClassCastException with EntityMode.DOM4J
+* fixed HQL dynamic instantiation with iterate()
+* fixed HQL bug with missing parantheses and implicit joins
+* fixed bug were Interceptor.getEntity() wasn't called if in cache
+* fixed bug in merge() of sorted sets
+* fixed bug in EntityMode.DOM4J with non-lazy embedded many-to-ones
+* fixed Criteria/Projection ordering bug
+* fixed HQL referencing component attribute
+* fixed column duplication detection for components
+* fixed eager fetching for many-to-many associations
+* fixed stack overflow with auto_close_session and aggressive_release and unclosed ScrollableResults/HibernateIterator
+* fixed bug in HQL parser regarding naked property refs which reference component properties
+* fixed bug with eager fetched arrays not being loaded
+* fixed bug in filter against joined-subclass
+* improved CacheMode.GET/IGNORE, disabled cache put
+* improved HQL support for standard SQL functions, including coalesce() and nullif()
+* improved filtering of many-to-many associations
+* added HQL support for cast(x as type) if SQL database supports it
+* added increment id generation for union-subclass
+* added ConnectionProvider.supportsAggressiveRelease() for managed environments
+* added support for caching of queries if filter is enabled
+* added PreparedStatement count to Statistics
+* added transactional/nontransactional read()/get() to Cache API
+* added quotation of schema names
+* added Distinct to Projection API
+* added config parameter 'connection.aggressive_release'
+
+Changes in version 3.0.1 (18.4.2005)
+------------------------------------
+* added HQL tuple constructor/comparison feature
+* added HQL "fetch all properties" override if instrumentation is used for lazy loading
+* added HQL projection feature, return Lists instead of arrays for projection
+* added HQL projection feature, return Maps with user-defined HQL SELECT aliases as keys
+* added HQL support for expressions in aggregation functions
+* added new IntegrityViolationException to MySQL dialect
+* added value mapping type 'big_integer'
+* added not-found="ignore|exception" switch for legacy associations (i.e. broken database integrity)
+* added fully automatic Session scoping in JTA environments with sf.getCurrentSession()
+* fixed bug in DTD that wouldn't allow union-subclass in separate file
+* fixed a MS SQL Server case sensitivity issue with native SQL queries
+* fixed a minor bug in subselect fetching
+* fixed case sensitivity in HQL functions
+* fixed a bug with listener assignment for save() operation (Matthew Inger)
+* fixed return-property in named SQL queries to work with all identifier names
+* fixed TransactionManager lookup (again) for WAS 6.0
+* fixed a bug with HQL batch delete and MS SQL Server
+* fixed session not getting closed with auto_close when rollback occured
+* improved concatentation handling in AST parser
+* updated dom4j to avoid memory leak in old version
+* updated C3P0
+
+
+Changes in version 3.0 (31.3.2005)
+----------------------------------
+* added support for autoflush/autoclose to HibernateServiceMBean
+* fixed initialization/session association detection problem of collections
+* fixed creation of FK constraints to union superclass table
+* fixed bug where union-subclass table did not get a PK constraint
+* added a separate log category for HQL parser warnings and errors
+* fixed bulk delete operation on MS SQL Server
+* added support for proxying protected methods (Juozas)
+* added support for unicode quoted strings in new HQL parser
+* fixed implied joins in subselect WHERE clause in new HQL parser
+* added SQLServer7Dialect to handle differences in functions
+* added support for JNDI-bound cache instances, future use for JBoss Cache
+* added scale attribute to column mappings for numeric precision control
+* added fetch=subselect for collections
+* added support for bulk update/delete against discriminator-based inheritence hierarchies
+* added the ability to use naked property refs in HQL (required in update/delete statements)
+* updated CGLIB 2.1.0
+* fixed NPE at BasicEntityPersister.getPropertyIndex (Todd Nine)
+* fixed issue with entity-name and subclasses (Sverker Abrahamsson)
+* fixed issue with correlated subqueries in new HQL parser
+* fixed a problem with native SQL query mapping and embedded composite identifiers
+* improved mapping binding, allowing unordered extends for pure entity-name hiearchies
+* fixed NPE for delete() with deprecated Lifecycle interface
+* fixed a problem with serial joins ending in component value in new HQL parser
+* fixed inner join/subselect precedence problem in new HQL parser
+* fixed indices() function in new HQL parser
+* fixed a bug in InformixDialect, now correct LIMIT clause
+* fixed a bug in idbag.remove() (Sebastien Cesbron)
+* fixed a conflict on OracleDialect between setMaxResult and LockMode.UPGRADE
+* fixed XML configuration file issue with SchemaExport
+* fixed an ArrayIndexOutOfBounds problem
+* renamed executeUpate() to executeUpdate()
+* fixed batch loading for property-ref entities
+* fixed loading from cache of <key property-ref> collection owner
+* fixed minor bug in SQL exception reporting
+* fixed dynamic-component cannot be bound to XML
+* fixed querying component with formula property
+* fixed incorrect table alias for order-by on many-to-many
+* fixed a bug for unidirectional one-to-many with moving child objects
+* fixed a bug with union-subclasses and persister creation
+* fixed a HQL concatenation problem on MySQL
+* fixed a bug where an unnecessary exception was thrown for a property-ref to a superclass property
+* fixed minor dtd bug
+* fixed new bug in Clob/Blob support
+* fixed issue with INDEX_OP and subclass joins on theta-join dialects
+* fixed some minor issues in query cache regions, including HB-1449
+* fixed superflous import and regression bug in verifyparameters
+* fixed two bugs in select id generator (Malcolm Green)
+* fixed increment generator for union-subclass mappings
+* updated JBoss Cache to 1.2.1alpha, fixing locking issues
+* made stat classes serializable
+* fixed merge(), now ignores blob and clob fields
+* added support/dialect for TimesTen
+* improved algorithm for batch fetching, more aggressive
+* improved toStrings()s for Statistics objects (Ryan Lynch)
+* renamed <result-*> to <return-*> for externalized SQL query mapping
+* renamed Session.openSession() for EntityMode to Session.getSession()
+* added support for CASE in HQL
+* fixed bug with filters and polymorphic queries
+* fixed import ordering problem of super/subclass mappings
+* switched to patched ANTLR 2.7.5, now using context classloader before doing class.forname
+* TableHiloGenerator now falls back to TableGenerator properly with max_lo < 2 (Emmanuel Bernard)
+* better transaction handling of TableGenerator in a JTA environment (Emmanuel Bernard)
+* removed hard coded log4j dependency (Emmanuel Bernard)
+* added support for stored procedure in named queries (Max Andersen)
+* added <property-result> to named SQL queries to allow users to use sql without {}-markup
+* added multi-column property support to native SQL mapping
+
+Changes in version 3.0rc1 (28.2.2005)
+----------------------------------
+* introduced EntityModes, and XML mapping preview
+* several minor dialect improvements
+* fixed a problem where filters were not applied to subclasses
+* fixed a problem where InstrumentTask would fail if applied to already-instrumented classes
+* fixed many problems with new parser and made it the default (thanks again to Joshua for the new parser)
+* implemented bulk update/delete queries for the new parser
+* fixed a minor bug in the classic query parser
+* renamed create() to persist() as per EJB3edr2
+
+Changes in version 3.0 beta 4 (11.2.2005)
+-----------------------------------------
+* support unidirection one-to-many with a not-null foreign key
+* support formulas for index and element of collections
+* support one-to-ones mapped to formulas
+* fixed a bug in proxying methods that return "this"
+* optimized proxies for embededded composite id classes
+* fixed a bug affecting <key-many-to-one>
+* fixed a bug caching newly inserted objects
+* introduced DetachedCriteria
+* support subselects in Criteria queries
+* miscellaneous Criteria API enhancements
+* fixed a problem where hibernate.max_fetch_depth applied to eager fetching via setFetchMode()
+* use inner joins for join fetching not-null fk associations
+* support unique="true" in <component> and <properties> mappings
+* union-subclass hierarchies may own collections (dtd bug)
+* added guid support for Oracle
+* new mechanism for auto-detecting unsaved-value
+* pass state array in delete events
+* improved implementation of hibernate.auto_close_session and hibernate.close_before_completion
+* fixed a bug where components with only collections would be incorrectly nullified
+* fixed a bug where criteria queries with projection could not be cached
+* fixed a problem where duplicate column name aliases could be generated
+
+Changes in version 3.0 beta 3 (30.1.2005)
+------------------------------------------
+* Major rework of Criteria queries, support for projection, grouping, aggregation, ordering by any attribute
+* various improvements to new HQL parser (Joshua Davis)
+* fixed a bug where <join fetch="select"> was broken for subclasses with duplicated property names
+* fixed problems with long types in Oracle DDL generation
+* added EnhancedUserType, UserCollectionType, UserVersionType
+* added CacheMode
+* fixed minor performance problem where cascade delete could add objects to second-level cache
+* added hibernate.default_batch_fetch_size
+* added hibernate.cache.use_structured_entries
+* different classes and collection roles may now share a cache region
+* don't include discriminators for abstract classes in generated SQL
+* it is no longer truly necessary for composite identifier classes to implement equals()/hashCode() (but still recommended)
+* workaround for bug in MySQL InnoDB with self-referential foreign keys
+* added lazy="true" to many-to-one and one-to-one mappings (requires bytecode instrumentation)
+
+Changes in version 3.0 beta 2 (24.1.2005)
+------------------------------------------
+* added LockAcquisitionErrorCodes to MySQL dialect (Jesse Barnum, Emmanuel Bernard)
+* added MultipleHiLoPerTableGenerator, one hi value per row/per table (compliant with EJB3)
+* added a generator handling multiple hi values per table (Emmanuel Bernard)
+* added events for pre/post SQL operation interception
+* added experimental support for JACC-aware configuration and events
+* added full support for implicit polymorphism in Criteria queries
+* added support annotated classes through XML configuration (Emmanuel Bernard)
+* added support for WebSphere's weird TxManagerLookup
+* added support for filters with dynamic-class mappings
+* added support for lists of parameters in filters
+* added support for scalar queries in createSQLQuery (Michael Gloegl)
+* added support for scalar results in native SQL queries (Michael Gloegl)
+* fixed SchemaExport/SchemaUpdate, now respect default_schema and default_catalog (Michael Gloegl)
+* fixed a bug in one-to-one mapping with property-ref
+* fixed a bug in the query cache lookup routine
+* fixed compilation problems on IBM JDK 1.4. and JDK 1.3.1
+* fixed custom SQL for loading when using composite identifiers
+* fixed exception thrown from optimistic locking failures
+* fixed support for limit queries (select first ?) in Informix
+* improved SchemaExport/Update, now respect default_schema and default_catalog
+* improved dialect handling, throw an exception if no dialect has been set
+* improved loading of mappings, no ordering of super/subclasses required anymore
+* improved statistics for second-level cache
+* improved table generators for hi/lo, can now be used in a JTA environment (Emmanuel Bernard)
+* query engine: added support for 'trim([leading | trailing | both] [expression from] expression)'
+* query engine: added support for DISTINCT and ALL
+* query engine: added support for FETCH
+* query engine: added support for HAVING count()
+* query engine: added support for HQL NOT IN and EJBQL '[NOT] MEMBER OF'
+* query engine: added support for ORDER BY COUNT(*)
+* query engine: added support for collections of scalar values
+* query engine: added support for literals in constructor select expressions.
+* query engine: added support for select elements(..) from Foo f
+* query engine: added support for template functions in the SELECT clause
+* query engine: fixed NOT LIKE
+* query engine: introduced EMPTY and added it to constant (support for IS [NOT] EMPTY)
+* updated dom4j, OSCache, EHCache, JBoss Cache, Xerces, Xalan, and Log4j
+* associated class where filter now applies to <one-to-one property-ref>
+
+Changes in version 3.0 beta 1 (21.12.2004)
+------------------------------------------
+* reimplemented HQL using an ANTLR-based AST parser (Joshua Davis)
+* added class="select" id generator
+* added Query.setReadOnly()
+* added hibernate.order_updates
+* introduced cascade refresh
+* added typed JDBC exceptions (Steve Ebersole)
+* improved lifecycle for CacheProviders (Steve Ebersole)
+* added Expression.isEmpty()
+* fixed some minor mapping DTD bugs (Ben Sommerville)
+* fixed auto-commit mode for SchemaUpdate
+* added default-lazy to <hibernate-mapping>, which defaults to true!
+* added fetch="join|select" and deprecated outer-join attribute
+* fixed a bug where <custom-insert> was not used for entities with "identity" id generation
+* fixed some problems with dynamic-class
+* added property-level optimistic-lock attribute, to allow an unchecked property
+* cascade lock() now cascades with LockMode.NONE
+* fixed some bugs in filter handling (Steve Ebersole)
+* added hibernate.transaction.flush_before_completion and hibernate.transaction.auto_flush_session
+* added JSR-220 compliant create() and merge() operations
+* cascade attribute is now multi-valued, with values save-update,create,merge,delete,delete-orphan,lock,evict,replicate,all-delete-orphan
+* index and unique-key attributes may now be multi-valued
+* introduced unsaved-value="undefined", the default for "assigned" ids and <composite-id>, which forces Hibernate to hit the db
+* primitive typed <id> property mappings now default to unsaved-value="0"
+* added ScrollMode
+* added dialect for Derby (Simon Johnston)
+* added MySQLMyISAMDialect and MySQLInnoDBDialect
+* added precision and scale mapping attributes, for numeric types in DDL
+* fixed a problem with duplicate column mappings on Sybase
+* read-write cache now uses version numbers to ensure consistency with database, if available
+* native SQL queries may now fetch a collection role (Steve Ebersole)
+* added sequential-select, optional and inverse attributes to <join/>
+* added <properties> element, which can be the target of a property-ref
+* fixed a bug relating to composite property-refs
+* Hibernate now much more robust if user does not implement equals()/hashCode() on id and unique key classes
+* enabled batch deletes for versioned data
+* fixed a minor bug in Session.close()
+* removed uuid.string and renamed uuid.hex to plain uuid
+* workaround for a MySQL bug in SchemaUpdate
+* added JDBCException.getSQL() and made various improvements to exception flow
+* createSQLQuery() now fully supports components
+* fixed a bug in SQL generation for <joined-subclass> mappings
+* fixed a bug where filter and query parameters could be bound in the wrong order (Steve Ebersole)
+* fixed a problem where quantifiers could not appear in SQL fragments
+* fixed a bug with dynamic components
+* fixed a bug where Dialect default properties overrode user-specified properties (Ben Sommerville)
+* fixed a bug where duplicate column name in a joined table caused an exception
+* implemented two-phase load for dynamic components
+* fixed a bug where cancelQuery() canceled a re-pooled statement
+* deleted collections are now removed from session-level cache
+* fixed a bug in LocaleType (Steve Ebersole)
+* use "with rr" to obtain UPGRADE locks in DB2
+* package attribute now significant for extends
+* fixed a minor problem with Hibernate Clobs and Blobs
+* extends attribute does no longer require specific ordering of mapping files
+
+Changes in version 3.0 alpha (23.8.2004)
+----------------------------------------
+* package rename net.sf.hibernate -> org.hibernate
+* checked exceptions are now runtime exceptions
+* some session methods deprecated and moved to org.hibernate.classic.Session
+* removed various deprecated functionality
+* added Filter API and mappings, for temporal, regional and permissioned data (Steve Ebersole, Gavin King)
+* support cascade delete via ON DELETE CASCADE constraint
+* added extra attributes to named query definition
+* added hibernate.use_identifier_rollback
+* added subselect mappings
+* added lazy="true" to property mappings
+* added <join/> for multitable mappings
+* added <union-subclass/> for table-per-concrete-class strategy
+* added Statistics API and JMX MBean (Gavin King, Emmanuel Bernard)
+* introduced new event-driven design (Steve Ebersole)
+* support for faster startup with Configuration.addCachableFile() (Joris Verschoor, Max Andersen)
+* mask connection password for log level greater of equals to info (Joris Verschoor, Emmanuel Bernard)
+* add check of named queries when building SessionFactory (Joris Verschoor, Emmanuel Bernard)
+* added custom EntityResolver setting capability (Emmanuel Ligne, Emmanuel Bernard)
+* PropertyValueException for null values in not-null properties of components (Emmanuel Bernard)
+* enhanced support for single- and no-argument sql-functions in HQL select clause (Michael Gloegl)
+* Added catalog element, to enable table names like catalog.schema.table (Michael Gloegl)
+* Added <sql-insert>, <sql-update> and <sql-delete> support (Max Andersen)
+* Support callable statements (stored procedures/functions) via callable="true" on custom sql (Max Andersen)
+* Added support for type parameters and typedefs (Michael Gloegl)
+* Added support for JDBC escape sequences in createSQLQuery (Max Andersen)
+* Added statistics per SessionFactory (Gavin King, Emmanuel Bernard)
+* Added a StatisticsService MBean for JMX publucation (Emmanuel Bernard)
+* support for updates via rownum in Oracle
+* fixed problems with SchemaUpdate
+* support for <column formula="..."/>
+* added hibernate.use_sql_comments
+* added property-ref to collection <key/>
+* fixed performance problems with <one-to-one property-ref=.../>
+* enhanced UserType with new methods assemble()/disassemble()
+* better algorithm for batch fetch batch sizes
+* added <dynamic-class>
+* added entity-name concept, and session methods save(entityName, object), update(entityName, object), etc
+* added framework in proxy package
+* native SQL queries may now fetch a collection role
+* added <loader/> for class and collection mappings
+* added getEntity() and getEntityName() to Interceptor
+* formula-based discriminators and association mappings
+* added "guid" id generation strategy
+* various improvements to dialects
+* <discriminator force="true"/> now acts as a filter on collections
+* where filters now apply in the on clause in an outer join
+* added hibernate.jdbc.factory_class to select a custom batcher
+* session now uses entity name + id to enforce uniqueness, instead of table name + id
+
+Changes in version 2.1.6 (9.8.2004)
+------------------------------------
+* fixed Quickstart/readme.txt instructions
+* fixed DB2/400 identity column support
+* fixed the scroll() query method
+* fixed exotic classloader problems with CGLIB
+* added insert="false" for discriminator columns which are part of a composite identifier
+* added several new configuration settings to JMX HibernateService
+* added new instantiate() method to SessionFactory.getClassMetadata()
+* improved the HSQL DB dialect with features from new version
+* added hibernate.jdbc.batch_versioned_data (Steve Ebersole)
+
+Changes in version 2.1.4 (2.6.2004)
+------------------------------------
+* improved Session serialization support by adding ability to serialize unflushed sessions (Steve Ebersole)
+* fixed Session.clear() functionality to clear the internal nonExists cache (Steve Ebersole)
+* much better implementation of scroll() (Steve Ebersole)
+* support "select new ..." for iterate() and scroll() (Steve Ebersole)
+* added support for multi-parameter SQL functions (Steve Ebersole)
+* fixed hbm2ddl generating infinite indexes on MySQL (Michael Gloegl)
+* fixed alias precedence in HQL queries, function names are second (Steve Ebersole)
+* added "transactional" as allowed cache concurrency strategy in XML configuration file
+* improved System.getProperties() with security exception warning in secure environments
+* improved Proxool integration, better property handling
+* fixed problem with use of getDefinedMethod() in secure environments (Ken Arnold)
+* fixed bug in createSQLQuery() which prohibited multiple aliases for the same entity (Max Andersen)
+* fixed query cache misses when using named bind parameters (Michael Greer)
+* recognize "left" and "right as keywords in SQL fragments
+* recognize SQL quoted identifiers in SQL fragments
+* improved identity handling on SQL Server by using scope_identity() for update counts (Arthur Fitt)
+* added DB2390Dialect for DB2/390 databases (Kristoffer Dyrkorn)
+* fixed a bug in toArray() of identifier bag collections (Khachchou Mohammed)
+* fixed a problem with DDL generation for serial columns in Informix
+* fixed a problem with DDL generation for timestamp columns in Informix (Michael Schmidt)
+* fixed a NPE that occurred calling saveOrUpdateCopy() for components
+* fixed a bug with replicate() and uninitialized collections
+* fixed a bug caching one-to-one associations
+* fixed eviction from named query cache regions
+
+Changes in version 2.1.3 (25.4.2004)
+-----------------------------------
+* added SELECT-clause SQL function support to main Dialects
+* fixed a problem where some unnecessary selects where issued for optional one-to-one associations
+* fixed a bug in SQL generation for criteria queries with multiple one-to-many joins
+* deprecated everything related to PersistentEnum
+* fixed an NPE that occurred when using <one-to-one property-ref> with composite ids
+* fixed a problem with JCA adaptor on WebLogic (Michael Gloegl)
+* improved behavior when removing elements from <idbag>s
+* fixed a bug in getGeneratedKeys() support (Michael Gloegl, Kevin Day)
+* fixed a bug when using Criteria queries with collections of joined-subclasses
+* fixed an NPE that occurred when calling comparator() on a lazy sorted set (Attila Szegedi)
+* fixed a bug when using setMaxResults() with native SQL queries in some Dialects
+* validate that composite id classes override hashCode() (Adrien)
+* fixed some minor problems with saveOrUpdateCopy()
+* fixed some problems in OSCache provider
+* fixed an NPE that occurred when calling a lazy collection after evicting from session
+* fixed an NPE that occurred when select-before-update is used with unversioned data (Patrick Peralta)
+* fixed a bug where dynamic-components could not be queried (Massimo Ferrari)
+* SQL formula parser now recognizes all Dialect-specific SQL functions (Anthony Patricio)
+* fixed a problem where SQL CASE statements could not appear in SQL formulas
+* fixed a problem where subselects with joins could not appear in SQL formulas
+* C3P0 and Proxool pools now cleaned up after SessionFactory.close()
+* fixed a bug where dirty checking of mutable properties was broken after lock()
+* fixed a minor bug where orphan delete was broken for newly saved instances
+* added Query.setFetchSize() and Criteria.setFetchSize()
+* PreparedStatement pooling in DBCPConnectionProvider can now be disabled (Emmanuel Bernard)
+* Query.setProperties(Object) now detects array and collection valued properties and delegates to Query.setParameterList() (Max Andersen, Nick Heudecker)
+* lengths of positional parameters and types arrays are now validated
+* fixed an obscure problem where a PreparedStatement was not closed
+
+Changes in version 2.1.2 (4.2.2004)
+-----------------------------------
+* added Session.isDirty()
+* fixed a very obscure concurrency problem with read-write cache for inverse collections
+* deprecated Criteria.returnMaps() / Criteria.returnRootEntities() in favor of new ResultTransformer framework
+* don't cache objects with dynamic-update="true" or <joined-subclass> mappings immediately after insert/update
+* added version checking to saveOrUpdateCopy()
+* fixed constraint violations that occurred when mixing identity columns with other id generation strategies
+* added Sybase 11.9.2 dialect to support older versions of Sybase that do not support ANSI joins (Colm O' Flaherty)
+* added Informix9Dialect (Finn McCann and Max Andersen)
+* added DB2400Dialect (Peter DeGregorio)
+* fixed a problem where mapping validation failure was reported as duplicate import (Michael Gloegl)
+* fixed a problem with Expression.not() in MySQL (Michael Gloegl)
+* added support for ResultSet.getGeneratedKeys() (David Morris, John Kristian)
+* added check attribute to allow check constraints in DDL
+* implicit polymorphism for Criteria queries (Shorn Tolley)
+* use IF EXISTS for dropping hilo tables (Michael Gloegl)
+* better exception report if deleted object is resaved by cascade
+* support nested components in Example queries (Emmanuel Bernard)
+* fixed a minor problem with onDelete() callbacks
+* fixed an obscure problem with select-before-update
+* added SunONETransactionManagerLookup (Robert Davidson)
+* fixed a problem with replicate() and <joined-subclass> mappings
+* made setParameterList() accept empty lists and deny null values (Max Andersen)
+* validation check on query parameters now allows setParameter(x, null) (Max Andersen)
+* added default-access to DTD (Max Andersen)
+* made Query.setParameterList() accept empty lists and deny null values (Max Andersen)
+* allow Query.setParameter(x, null) (Max Andersen)
+* queries with "select new" now cacheable
+* throw meaningful exception when lazy initialization occurs on disconnected session
+* added default-access to <hibernate-mapping> (Max Andersen)
+* added -text support to SchemaUpdate (Max Andersen, Matt Hall)
+* fixed broken implementation of embedded composite keys with createSQLQuery() (Max Andersen)
+* added hibernate.cache.use_minimal_puts config property to reduce unnecessary second-level cache puts
+* optimized performance of orphan delete detection (Bertrand Renuart)
+* fixed problem where unnecessary UPDATE occurred after INSERT for versioned objects with collections
+* WebSphereTransactionManagerLookup for WAS 5.1 (Edina Pimp)
+* Criteria queries now cacheable (Mario Ivankovits)
+* fixed problem with ordered, paginated queries in DB2 (Tim Collins)
+* fixed a bug caching <idbag>s
+* lazy="true" collections are now lazy even when available in cache
+* fixed a problem with version unsaved-value="negative"
+* added hibernate.cache.region_prefix config property (William Drai)
+* fixed problem where configuration input streams were not closed (Rajesh Patel)
+
+Changes in version 2.1.1 (17.12.2003)
+-------------------------------------
+* added optional package attribute to <hibernate-mapping>
+* added <meta-value> element to allow simpler <any> mapping
+* native SQL queries are now cacheable - added <synchronize> element to allow correct result set expiry
+* fixed a bug in CGLIB2 integration (Chris Nockleberg)
+* added NamingStrategy
+* don't cache objects with formula properties immediately after insert/update
+* log generated SQL to a special category
+* type of property with access="field" may now be guessed using reflection
+
+Changes in version 2.1 final (12.12.2003)
+-----------------------------------------
+* fixed a problem with CGLIB2 proxies and method calls inside constructors
+* fixed a bug running SchemaExportTask with mappings in jar files (Tom McCune)
+* allow custom persister declaration for subclasses (Nick Johnson)
+* fixed handling of sequences in SchemaUpdate on Oracle (Andrew Delpha)
+* fixed a bug where Iterator did not handle single null values correctly
+* detect and throw exception in the case of a duplicate property mapping
+* don't auto-create indexes for collection foreign keys (roll back to 2.0.x)
+
+Changes in version 2.1 rc1 (29.11.2003)
+---------------------------------------
+* long identifier and discriminator column names are now safely aliased (Max Andersen)
+* cleaned up mapping package to allow applications to manipulate metamodel programmatically
+* fixed a recent bug where collection sort order was lost in second-level cache
+* formula attribute now supported for joined-subclass mappings
+* formula properties may now be used anywhere in queries
+* dialect-specific query pagination for SQL Server
+* fixed a bug where a long path expression ending in collection access by index missed some tables in SQL FROM clause
+* fixed a very ancient performance problem where null one-to-one associations caused n+1 selects
+* added Session.saveOrUpdateCopy()
+* fixed some bugs in Example queries
+* fixed some minor bugs in dialect-specific query pagination
+* immutable entity passed to update() is now lock()ed instead
+* reworked the semantics of nonstrict-read-write
+* JCS cache support now deprecated
+* fixed some obscure bugs in collection handling
+* migrated to CGLIB2 (thanks to Chris Nockleberg)
+* fixed bugs in replicate()
+* fixed a bug affecting joined-subclass mappings with dynamic-update=true
+* performance improvements to boolean type mappings (Bertrand Renuart)
+* integrated JBoss TreeCache clustered cache (thanks to Bela Ban and Ben Wang)
+* fixed a bug in new query parameter validation (Steve Ebersole)
+* fixed a bug where <any> mappings caused unnecessary ObjectDeletedException at flush time
+* fixed a bug where associations with property-ref mappings were not properly cached
+* throw PropertyValueException when not-null properties are null at flush time
+* added unsaved-value attribute to version property mapping (Emmanuel Bernard)
+* tolerate classnames containing $ (Steve Ebersole)
+
+Changes in version 2.1 beta 6 (5.11.2003)
+-----------------------------------------
+* added Session.cancelQuery()
+* improvements to transaction handling for failed commit (thanks to Juergen Hoeller)
+* added cascade="delete-orphan"
+* fixed an exception that occurred when a property was declared not-null="true" update="false" (thanks to John Kristian)
+* support multiple named query cache regions (Mikheil Kapanadze)
+* some improvements to collection reattachment
+* fixed a bad bug with adds to an uninitialized bag or list
+* removed support for <dynabean/> components
+* added <dynamic-component/> mapping for properties of type Map
+* fixed a bug where schema export generated index names that were too long for DB2
+* allow per-region expiry policies in OSCache (Matthias Bogaert)
+* fixed a stack overflow that could occur while initializing nonlazy collections
+* fixed a bug in case-insensitive like for Example queries
+* fixed a bug in ScrollableResults.setRowNumber() (Martin Priekopa)
+* improvements to the cache concurrency strategies
+
+Changes in version 2.1 beta 5 (30.10.2003)
+------------------------------------------
+* Support for custom CollectionPersister (Nick Johnson, Max Andersen)
+* Support for named SQL queries (Max Andersen)
+* duplicate named queries now throws MappingException instead of just logging warning (Max Andersen)
+* fixed problems with WebSphereTransactionManagerLookup (Ralf Taugerbeck, Daniel Bradby)
+* added support for custom collection persisters (thanks to Max Anderson, Nick Johnson)
+* fixed a performance problem during query compilation (Bulent Erdemir)
+* composite keys now supported in createSQLQuery() (Max Andersen)
+* fixed JCA adaptor to run in WebLogic (Daniel Bradby)
+* integrated SwarmCache (Jason Carreira)
+* integrated OSCache (Matthias Bogaert)
+* fixed an NPE that could occur with lists and orphan delete
+* allow nullable one-to-one with property-ref
+* improved usage of Dialect-specific limit SQL
+* fixed problem where non-lazy collections held by cached objects were not immediately initialized
+* fixed getReturnTypes() for native SQL queries (Max Andersen)
+* fixed problems with Criterions that applied to multi-column properties
+* check of rowcounts when JDBC batch updates enabled
+* added named SQL queries using <sql-query> element (Max Andersen)
+* added some extra validations so Hibernate fails earlier when user makes mistakes
+* allow lazy="true" as an alternative to proxy="ClassName"
+* removed dependency to commons-lang
+* SchemaExport now creates indexes for collection foreign key columns if specified by Dialect
+* fixed a bug parsing named parameters in setParameterList()
+* select new Foo(...) will now tolerate null values if the constructor accepts a wrapper type
+* fixed a problem detecting Proxool
+* added logging of persistent object states during flush()
+* allow "not null" as a discriminator value
+* added "parameters" config param to "sequence" generator (Matthias Bogaert)
+
+Changes in version 2.1 beta 4 (3.10.2003)
+-----------------------------------------
+* fixed a bug where <any> mappings did not handle proxies correctly
+* implemented new optimistic-lock strategies
+* fixed several bugs in Criteria query API
+* fixed a bug caching property-ref associations
+* improvements to XML Databinder (Ara Abrahamian)
+* added Session.replicate() and ReplicationMode
+* added ScrollableResults.setRowNumber() / ScrollableResults.getRowNumber()
+* added query cache and Query.setCacheable()
+* added Criteria.returnMaps()
+* fixed some problems with CGLIB proxies
+* fixed an NPE that occurred when a joined-subclass of a versioned entity defined only collections
+* added the access attribute, direct field access and the PropertyAccessor extension point
+* added MatchMode for use with Criteria queries (thanks to Michael Gloegl)
+* fixed a bug where some lazy="false" collections were not immediately initialized
+* fixed problem with WebSphere 5 TransactionManager
+* support schema attribute in MySQL, by using an underscore in the table name (Chris Hane)
+* now seperate Dialects for Interbase and Firebird (Reha Cenani, Max Andersen)
+* removed built-in PreparedStatement cache
+* added Session.getSessionFactory()
+* fixed problem with native SQL queries and Query.setProperties() (Max Andersen)
+* Query now fully validates parameters against the query string before passing them to JDBC (Max Andersen)
+* fixed an NPE in SessionFactory.close()
+* fixed an NPE that occurred when using <idbag>s
+* added SQL-level query results paging to DB2Dialect
+* "foreign" id generator now handles detached instances
+
+Changes in version 2.1 beta 3 (7.9.2003)
+----------------------------------------
+* added Example queries
+* fixed an exception that occurred at startup with <key-many-to-one> and <joined-subclass>
+* fixed a bug where composite-elements were not being updated if a property not in the equals() was changed
+* <parent> property of a composite-element may now be used in equals()
+* named parameters may now be used in HQL order by clause
+* null value of version property now indicates unsaved instance
+* added select-before-update attribute
+* two-phase loading now use for components
+* better implementation of equals()/hashCode() for proxies
+* added property-ref attribute to <many-to-one>
+* renamed result() to uniqueResult()
+* added Session.get()
+* added HashtableCacheProvider
+* JTA TransactionManager now used even when not using Hibernate Transaction API
+* always bypass process-level cache for LockMode.READ
+
+Changes in version 2.1 beta 2 (27.8.2003)
+-----------------------------------------
+* <subclass> and <joined-subclass> may now appear outside of a <class> element, by providing the extends attribute (Max Andersen)
+* fixed an NPE at startup that was introduced in beta 1
+* fixed a bug in Map.putAll()
+* new pluggable cache API
+- deprecated <jcs-cache> in favor of <cache>
+- net.sf.hibernate.cache.CacheProvider settable via hibernate.cache.provider_class
+* more aggressive caching
+* added Hibernate.close(Iterator)
+* Criteria queries may now include joins
+- Criteria.addJoin()
+- Criteria.createCriteria()
+* hibernate.transaction.manager_lookup_class should now ALWAYS be specified in JTA environment when using jcs caching
+* fixed a bug caching <key-many-to-one>
+* fixed bug where cached component did not get <parent> property populated
+* added hibernate.max_fetch_depth property
+* smarter outer-join fetching
+* transient object may now be associated with session using Session.lock()
+* added Query.result(), Criteria.result()
+
+Changes in version 2.1 beta 1 (10.8.2003)
+-----------------------------------------
+* batch-size attribute for collection and class mappings, to allow batch loading
+* collections of "value types" (including composite-elements) may now appear in HQL from clause
+* more efficient loading of collections, and better handling of non-lazy collections
+* added HQL index() function to allow access to collection element index
+* added Session.createSQLQuery() (Max Andersen)
+* added outer-join attribute to collection mappings
+* Criteria.setFetchMode() now applies to collection-valued path expressions
+* added property-ref attribute to <one-to-one>, enabling unique foreign key associations
+* added hibernate.max_fetch_depth config property
+* added hibernate.hbm2ddl.auto config property
+* fixed a bug with combination of <jcs-cache> and <key-many-to-one>
+* support for Dialect-specific SQL functions in HQL select clause (David Channon)
+* added Session.clear()
+
+Changes in version 2.0.2 (2.8.2003)
+-----------------------------------
+* subqueries may now use HAVING and GROUP BY clauses
+* fixed a bug with setMaxResults(), setFirstResult() in HSQL (introduced in 2.0.1)
+* fixed a bug in Set.removeAll()
+* fixed a bug in SchemaUpdate (Mathias Bogaert)
+* added weak typing functionality to ScrollableResults
+* fixed a bug with "calendar" versioning in IBM JDK1.3.1 (workaround for JDK bug)
+* fixed a bug in mapping DTD that caused a problem for hbm2java (Max Andersen)
+* fixed a bug querying nested components
+* SQL generation now prefers ANSI-style inner joins to theta inner joins
+* fixed a bug caching collection references loaded using FETCH
+* fixed a bug with composite foreign keys in normalized table mappings (Tom Sedge)
+* limit support for Interbase (Ludovic Orban)
+* added where attribute to <class> mappings
+* added cascade="all-delete-orphan" for collection mappings
+* fixed a bug binding named parameters with setMaxResults()/setFirstResults()
+* fixed some minor bugs in HQL translator
+* fixed a long-standing bug where a <key-many-to-one> could not be dereferenced in HQL
+* SQL UPDATEs now occur in a predictable order (same order as objects were loaded)
+* support for SELECT ... FOR UPDATE in SAPDB
+* fixed bug where Criteria queries against a subclass also returned superclass instances
+* fixed a very rare bug where an update could get lost with normalized mappings
+* fixed a problem with proxied class heirarchies rooted at an interface or abstract class
+* where and order-by attributes now allow SQL function calls and subselects
+* added formula attribute to <property> tag, to allow "computed" properties
+* fixed a bug where PreparedStatements were sometimes not closed when an exception occured
+* workaround for a problem with <joined-subclass> and Interceptor.onFlushDirty()
+
+Changes in version 2.0.1 (17.6.2003)
+------------------------------------
+* fixed some problems with new dialect-specific LIMIT clauses
+* improved parsing of collection where attribute
+* made one-to-many bags more efficient (they are really sets!)
+* allowed type="calendar" for <version> properties
+* fixed a bug with locking a versioned composite-id class
+* refresh() may now take a transient instance
+* added ProxoolConnectionProvider (Martin Crawford)
+* fixed some minor JCA issues (Mike Mosiewicz)
+* fixed a bug with FETCH and sorted associations
+* improved performance of SchemaUpdate tool (Teodor Danciu)
+* fixed a bug in Configuration.addFile(String) (Ken Geis)
+* tidied up and documented hbm2ddl package (esp. Ant tasks)
+* deprecated CounterGenerator in favor of IncrementGenerator
+* improved logging during initialization
+* deprecated "vm" in favor of "increment" id generator
+
+Changes in version 2.0 final (8.6.2003)
+---------------------------------------
+* added "fetch" keyword to HQL
+* added evict() methods to SessionFactory for JVM-level cache
+* destroy caches from SessionFactory.close()
+* fixed an NPE in Session.evict() (Simon Spero)
+* added Query.setLockMode()
+* tidied up implementation of Loader
+* release ResultSets more aggressively
+* miscellaneous improvements to some Dialects
+* hbm2java now honors the sort attribute (Max Andersen)
+* added exceptions to Interceptor interface
+* fixed problem with setMaxResults(), setFirstResult() in Oracle (introduced in beta 6)
+* fixed some SQL generation that was a problem for Sybase (Dietmar Posselt)
+* fixed some problems with ODMG API (Oliver Gries)
+* added JOTMTransactionManagerLookup (Low Heng Sin)
+* added JOnASTransactionManagerLookup (?)
+* fixed a bug in WeblogicTransactionManagerLookup (Mathias Bogaert)
+* added Criteria.setFetchMode()
+* added new Expressions
+* much more elegant/robust handling of quoted identifiers
+* renamed Hibernate.association() to Hibernate.entity()
+* added dynamic-update and dynamic-insert mapping attributes
+* fixed a bug with refresh() of objects with collections
+* HQL aliases now optional - "from Cat" now legal
+* platform-independant quoting of identifiers using backticks
+
+Changes in version 2.0 beta 6 (10.5.2003)
+-----------------------------------------
+* fixed a bug querying one-to-many associations to a <joined-subclass>
+* added support for dialect-specific LIMIT-style clauses (David White)
+* added <idbag>
+* fixed bug in hashCode() of persistent collections
+* <joined-subclass> now supported in HSQL (Wolfgang Jung)
+* fixed problem for XML parsers which ignore default values declared in DTD
+* <meta> tags can now be set to not be inheritable
+* fixed bug in Expression.in()
+* fixed an NPE that could occur from update() in very strange cases (Chris Nockleberg)
+* disabled outer-join back to owner when initializing one-to-many (performance improvement)
+* fixed a bug in Query.setParameterList() (Nick Heudecker)
+* improved JCA support (Igor Fedorenko)
+
+Changes in version 2.0 beta 5 (21.4.2003)
+-----------------------------------------
+* Informix support (Steve Molitor)
+* fixed a bug parsing "select new ... " queries
+* deprecated "object" type in favor of <any> mappings
+* added Session.contains()
+* added extra DBCP config options (Alex Burgel)
+* SessionFactory.close() now unbinds from JNDI
+* added Session.evict()
+* got rid of an unnecessary SQL DELETE issued when an empty collection was dereferenced
+* where attribute of collection mappings no longer ignored for deletion
+* improved logging
+* support polymorphic associations to "embedded" composite id classes
+* various bugfixes to collection filter parameter binding
+* fixed some problems with proxies introduced in earlier beta versions
+* fixed bug with self-reference in the case of identity column id generation
+* added hibernate.cglib.use_reflection_optimizer property
+* added nonstrict-read-write cache
+* fixed an SQL-generation bug in new Criteria API
+* added CompositeUserType
+* sequence and table id generators now aware of default-schema
+* added update and insert attributes to <component> element
+* fixed a bug with expressions like elements(foo.bar.baz) in where clause
+* more efficient Set initialization (two-phase load)
+* removed support for hibernate.query.imports and added <import> mapping element
+* fixed problem in DBCP connection validation and added new config properties
+* hbm2java can now generate finder methods for persistent objects (experimental) (Matt Hall)
+* hbm2java small fixes/refactorings to support generating more than one file per persistent object (Max Andersen)
+
+Changes in version 2.0 beta 4 (22.3.2003)
+-----------------------------------------
+* Major HQL improvements
+- from "Foo as foo join foo.bars as bar" instead of "from foo in class Foo, bar in elements(foo.bars)"
+- "select new Foo(bar.name, bar.amount) from ...."
+- outer and full join support
+* Query methods now return this, to allow chaining
+* FrontBase support (Run Lussier)
+* experimental JCA support (Daniel Bradby)
+* hbm2java now can generate Beans style property events (Klaus Zimmermann)
+* support SQL identifiers quoted with []
+* fixed bug with PostgreSQL
+* name attribute now optional in .cfg.xml
+* support for postgres ilike operator (M Lang)
+* squash warnings with GNU JAXP (Chris Nockleberg)
+* fixed a bug in Query.setParameterList()
+* Ingres support (Ian Booth)
+* collections now detect changes not made via wrapper for newly saved objects
+* new (experimental) Criteria + Expression APIs
+* Query.setEntity(), etc, now aware of proxies (also improved hueristics for guessing Type)
+* added Hibernate.isInitialized()
+* detect changes made directly to newly-wrapped collection (ie. not via the wrapper)
+* added Hibernate.refresh(Object, LockMode)
+* update(), saveOrUpdate() no longer initialize a proxy
+* fixed problems with Sybase
+* added force attribute to <discriminator>
+* improved handling of null discriminator-value
+* support SQL-style '' escape for HQL strings
+
+Changes in version 2.0 beta 3 (24.2.2003)
+----------------------------------------
+* collections now represent null elements as a missing row
+* collections now deserialize correctly (fix for bug in beta 2)
+* standardised on dom4j for XML parsing
+* fixed bugs in collection caching (an exception occurred for some sorted collections and some kinds of maps)
+* allowed null discriminators
+* set autocommit to true in SchemaUpdate
+* fixed a stack overflow that could occur in toString() of classes created with hbm2java (Max Andersen)
+* fixed a bug where composite-element <parent> property was not being set after retrieval from cache
+* added where attribute to collection mappings to allow filtering
+* fixed a exception that occurred when wrapping collections with sort="MyComparator" (Jason Horne)
+* objects with mutable="false" are now never updated
+* fixed an exception that occurs with <key-many-to-one> association to a class with a composite id (Stefano Travelli)
+* added SchemaExport Ant task (Rong C Ou)
+* integrated latest CGLIB release (Juozas Baliuka)
+- added support for new CGLIB reflection optimizer (Juozas Baliuka)
+* improved query cache algorithm (Who?)
+* fixed a bug in "object" type
+* Lists and arrays now represent null elements as a missing row
+* fixed a bug in Hibernate PreparedStatement cache where maxRows and fetchSize were not cleared before re-caching
+* fixed a bug in HibernateService that caused a restart to fail
+* added SybaseAnywhereDialect (?)
+* added SessionFactory.close()
+
+Changes in version 2.0 beta 2 (2.2.2003)
+----------------------------------------
+* property column names may now be of any length (Mark Woon)
+* fixed problem where CodeGenerator created private get/set pairs (Max Andersen)
+* fixed all silly bugs in Configuration.configure()
+* efficient collection updates from Session.update()
+* added <jcs-class-cache> and <jcs-collection-cache> elements to hibernate-configuration.dtd
+* support for normalized mappings for databases with DECODE instead of CASE (Simon Harris)
+* added Oracle9Dialect
+* added JRun4TransactionManagerLookup (Joseph Bissen)
+* fixed JDBCException to keep reference to underlying SQLException
+* fixed a bug loading many-to-many associations with a repeated column name
+* fixed a bug in ShortType
+* added IngresDialect (Ian Booth)
+* added --config option to SchemaExport
+
+Changed in version 2.0 beta 1 (28.1.2003)
+-----------------------------------------
+* renamed packages to net.sf.hibernate.*
+* all API methods now wrap SQLExceptions
+* removed support for toplevel collections / subcollections
+* created hibernate-mapping-2.0.dtd
+- renamed 'readonly' attribute to 'inverse'
+- renamed 'role' attribute to 'name'
+- changed default value for 'unsaved-value' to "null"
+- added mandatory 'name' attribute to <param>
+- added <meta> tag
+* created hibernate-configuration-2.0.dtd
+* brand new Configuration API, including exposed mapping package
+* completely reworked IdentifierGenerator framework
+- built-in generators now auto-detect the type (so integer identity columns are supported, for example)
+- parameters are now named
+- built-in strategies are renamed
+* expanded Interceptor interface
+* removed exceptions that occur if an object is saved or deleted multiple times in a session
+* added <parent> subelement to <composite-element> and <nested-composite-element>
+* collections except for <bag>s now implement by-value equals() and hashCode()
+* removed all deprecated methods
+* added Session.refresh()
+* added dynamic-update functionality
+* added update and insert attributes to <property> and <many-to-one> mappings
+* added elements(), indices(), size(), maxelement(), minelement(), maxindex(), minindex() collection functions to query language
+* huge improvements to CodeGenerator (Max Andersen)
+* enhanced outerjoin fetching support in queries
+* experimental support for DynaBeans as components
+
+Changes in version 1.2.3 (28.1.2003)
+------------------------------------
+* fixed a recently-introduced problem with Timestamp dirty checking
+* added createClob(), createBlob() for streams (Benoit Menendez)
+* SchemaUpdate now configures Dialect correctly (Michael Locher)
+* update() now working for classes with embedded composite ids
+* unsaved-value attribute now recognized for <composite-id>
+* fixed a minor problem where a very specific kind of SQL select did not qualify a column name
+* added Query.getQueryString()
+* fixed an NPE that sometimes occurred when hibernate.connection.username was not specified
+* fixed a bug in SchemaExport where foreign key constraints did not use qualified tablenames
+* added isFirst(), isLast() to ScrollableResults
+* fixed bug finding properties inherited by mapped interfaces
+
+Changes in version 1.2.1b (4.1.2003)
+------------------------------------
+* fixed an NPE that occurred while loading Hibernate classes in IBM JVM
+* arbitrary JNDI InitialContext properties may now be passed as hibernate.jndi.*
+* fixed a problem where index column was not being nullified when an entity was removed from a one-to-many
+
+Changes in version 1.2.1 (31.12.2002)
+-------------------------------------
+* Changed the MySQL mapping of Hibernate "timestamp" to MySQL "DATETIME" (Matthias Schwinn)
+* TransactionManagerLookup classes now define defaut UserTransaction JNDI names
+* support for WebSphere 5 (Venkat Srinivasan)
+* fixed a bug with query expressions of the form "foo.bar.id" for normalized mappings
+* experimental Blob/Clob support (thanks to Benoit Menendez and Mark Woon)
+* improvements to SchemaUpdater (Benoit Menendez)
+* deprecated suspendFlushes() / resumeFlushes() in favor of FlushMode
+* deprecated IDGenerationException in favor of IdentifierGenerationException
+* fixed a bug introduced in 1.2 final where cascade save-update was sometimes ignored for readonly="true" bags
+* fixed a bug caching null-valued one-to-one associations
+* CodeGenerator now supports <bag> and <joined-subclass>
+* fixed problem with TimestampType on DB2 (Jonas)
+* fixed a bug in generated SQL for collections with <joined-subclass> mappings (Robson Miranda)
+* fixed a bug caching Maps (Benoit Menendez)
+* SchemaExport now accepts a .jar file as a source of mappings
+* hibernate.dbcp.validationQuery setting (Juozas Baliuka)
+* hibernate.c3p0.validate setting
+* added Query.setTimeout()
+* setMaxResults() now behaves sensibly on SAPDB (Russel Smyth)
+* added Query.setProperties() and Query.getNamedParameters(), fixed a bug in Query.getReturnTypes()
+* CodeGenerator now generates equals() and hashCode() for composite-id classes (and toString() for all classes)
+* CodeGenerator now includes superclass properties in subclass constructors (Max Andersen)
+* added Hibernate.custom()
+
+Changes in version 1.2 final (7.12.2002)
+----------------------------------------
+* fixed a bug where uppercase IS NOT NULL, NOT IN, etc were not parsed correctly
+* addition to readonly="true" bags now no longer requires collection initialization
+* added ResinTransactionManagerLookup (Aapo Laakkonen)
+* improved exception message when setting null to primitive type (Max Andersen)
+* improved exception message for an unserializable identifier
+* support for overloaded setter methods (patch by Alex Staubo)
+* CodeGenerator support for <composite-element> (patch by Wolfgang Jung)
+
+Changes in version 1.2 beta 4 (29.11.2002)
+------------------------------------------
+* fixed bugs in one-to-many associations to a <joined-subclass>
+* LockMode class now properly serializable
+* exceptions thrown by proxied objects are now propagated correctly (rather than being wrapped)
+* made Calendar types compilable in JDK1.2
+* added --format and --delimiter options to SchemaExport (thanks to Richard Mixon)
+* fix for problem with class with no properties + native id generation + MS SQL Server contributed by Max Andersen
+* fixed a BAD bug in Hibernate.configure() (thanks to Rob Stokes)
+* CodeGenerator now recognizes <key-many-to-one> (patch by Wolfgang Jung)
+* CodeGenerator now recognizes <version> and <timestamp> (patch by Max Andersen)
+
+Changes in version 1.2 beta 3 (26.11.2002)
+------------------------------------------
+* fixed bug in UPDATE SQL generation for <joined-subclass> mapping strategy (fix by Robson Miranda)
+* support <composite-id> correctly in CodeGenerator (patch by Tom Cellucci)
+* fixed an exception that occurred with short qualified tablenames
+* added the polymorphism attribute to the <class> element
+* allow "not between", "not in" in query language
+* allow subqueries beginning with a from clause in query language
+* query expressions like "not (foo.bar.baz=1)" now translated to "(bar.baz!=1 and foo.bar=bar.id)"
+* support for PostgreSQL ~ operator (regular expression match)
+* load(id, lockMode) now working for normalized table mappings
+* now compiling properly under JDK1.2, 1.3 (fix by Tom Cellucci)
+* support for subcollections in query language: foo.bars[2]['index'], foo.bars[4].elements, foo.bars[0].size, etc.
+* added calendar and calendar_date types
+* find() queries may now return scalar values
+* component-type properties may appear in a select clause
+* ConnectionProviders now set isolation level before toggle autocommit
+* Iterator.next() now throws NoSuchElementException as per Iterator contract (fix by Alex Staubo)
+* database reverse engineering GUI tool contributed by Tom Cellucci
+* SchemaExport now generates column in mapping file order (rather than alphabetical order)
+* <joined-subclass> mappings working on Oracle (?)
+
+Changes in version 1.2 beta 2 (15.11.2002)
+------------------------------------------
+* support multi-argument SQL functions in queries
+* reintroduced deprecated form of update() with slightly altered semantics
+* fixed BAD problem in the generated SQL for certain queries
+* added OrionTransactionManagerLookup
+
+Changes in version 1.2 beta 1 (11.11.2002)
+------------------------------------------
+* Fixed a bad bug binding to JNDI with servers that use serialization in preference to getReference()
+* support for quoted SQL identifiers (patch by Jean-Francois Nadeau)
+* Hibernate.initialize() allows the user to force initialization of a proxy or persistent collection
+* fix to minor bug in CodeGenerator by Max Andersen
+* fixed a problem with outerjoin fetching of one-to-one associations defined on subclasses
+* fixed a minor problem with proxies of classes that override finalize()
+* finished work on normalized table mappings using <joined-subclass> declaration (only for databases with ANSI OUTER JOIN and CASE)
+* deprecated hibernate-mapping.dtd in favor of hibernate-mapping-1.1.dtd
+* reworked unmapped class / interface / table-per-concrete-class query functionality, fixing several problems
+* removed deprecated methods
+* deprecated findIdentifiers()
+* fixed some problems with embedded composite identifiers
+* fixed a bug cascading deletes to one-to-one associations
+* CodeGenerator now generates isFoo() style getters for boolean properties (patch by Aapo Laakkonen)
+* components may now have a nonpublic constructor (patch by Jon Lipsky)
+* changes / bugfixes to MapGenerator tool
+* experimental SchemaUpdate tool contributed by Christoph Sturm
+
+Changes in version 1.1.8 (30.10.2002)
+-------------------------------------
+* full support for composite keys in query language
+* fixed bug where character type could not be null
+* fixed bug parsing collection filters like: "group by this.date"
+* fixed a bad bug where C3P0 properties were not always being used
+* replaced hibernate.use_jdbc_batch with hibernate.jdbc.batch_size
+* renamed some other properties to hibernate.jdbc.*
+* made hibernate.show_sql settable from JMX (patch by Matas Veitas)
+* added SessionFactory.getAllClassMetadata(), getAllCollectionMetadata (patch by Max Andersen)
+* allowed use of concrete-class proxies with inherited classes ie. <subclass name="ConcreteClass" proxy="ConcreteClass">
+* HibernateException extends Apache commons lang NestableException (patch by Max Andersen)
+* <parent> subelement of <component> allows a component to get a reference back to owning entity
+* Query.setParameterList() to bind lists of values to "in (:list)"
+* Java constants may now be used in Queries
+* serialization of an object graph now removes all initialized proxies
+* several other improvements to proxy handling
+* proxies may now be used in JDK 1.2
+
+Changes in version 1.1.7 (25.10.2002)
+-------------------------------------
+* added Session.createFilter()
+* fixed a bug parsing queries with properties of form idXXX (introduced in 1.1.6)
+* fixed a bug parsing queries with the id property named in the select clause (introduced in 1.1.6)
+* fixed a bug dirty checking big_decimal (fix by Andrea Aime)
+
+Changes in version 1.1.6 (24.10.2002)
+-------------------------------------
+* classes without subclasses may now declare themselves as their own proxy
+* outer-join attribute now working for component properties and <many-to-many>
+* outer-join="true" will now force outerjoin loading for an association even if associated class has a proxy
+* enabled oracle-style outerjoins for SAP DB
+* version properties may now be long or short (previously always integer)
+* discriminators may now be boolean type
+* fixed the foo.bar.id.baz syntax for queries doing composite-key joins
+* fixed an NPE that occurred when no Dialect was specified
+* CodeGenerator now fully proxy-aware (patch by Max Andersen)
+* removed dependency upon trove4j
+
+Changes in version 1.1.5b (20.10.2002)
+--------------------------------------
+* fixed an NPE that occurred on JMX startup
+* smarter fetching for one-to-one associations
+
+Changes in version 1.1.5 (19.10.2002)
+-------------------------------------
+* added built-in currency and timezone types
+* hibernate-mapping-1.1.dtd
+- added <index-many-to-many> and <composite-index> subelements of <map>
+- added <key-property> and <key-many-to-one>
+- renamed "save/update" to "save-update"
+- tightened up the dtd (now using enumerated attribute types)
+* enabled multi-column map indexes (ie. key of a Map)
+* composited-id may now include a many-to-one association
+* improvements to Databinder contributed by Brad Clow
+* fixed bugs in minIndex, maxIndex, minElement, maxElement
+* fixed a problem with JTATransaction in a JBoss BMT bean
+* added addMapResource() to the MBean
+* minor improvements to Configuration
+* more accurate cache entry timestamping to increase the likelihood of cache hits
+* JCS cache may now be used with JTATransaction in WebSphere, Weblogic, JBoss (thanks to Matt Baird)
+* improvements to CodeGenerator contributed by Andrea Aime
+* stopped a TransientObjectException that was being thrown when it shouldn't be
+* re-enabled primary key export for tables of sets with not-null elements
+* hibernate.statement.fetch_size configuration contributed by Matas Veitas
+* added Interceptor application callback interface
+* added metadata package to expose persistence metadata to the application
+* changed filter() argument type from Collection to Object to allow filtering of arrays and Maps
+* added <column> index attribute to allow table indexes to be specified in mapping document
+* implemented support for queries against interfaces and abstract superclasses
+
+Changes in version 1.1.4b (4.10.2002)
+-------------------------------------
+* fixed problems for JDK1.2 (thanks to Chris Webb)
+
+Changes in version 1.1.4 (4.10.2002)
+------------------------------------
+* New locking API
+* disabled 2-phase load for objects contained in Sets (because they should be initialized before equals() or hashCode() is called)
+* fixed a bug where non-serializable cache entries could not be cached by JCS auxiliary cache
+* fixed a bug in dirty checking PersistentEnums
+* deprecated getID() in favor of getIdentifier() (for mainly cosmetic reasons)
+* HibernateService may now be subclassed to obtain mapping files by some other mechanism (patch by Chris Winters)
+
+Changes in version 1.1.3 (1.10.2002)
+------------------------------------
+* new 2-phase loading process (replaces complicated "deferred" loading process)
+* new ScrollableResults interface for efficiently navigating Query results
+* removed deprecated interfaces
+* created engine package to hold "internal" APIs (ie. the external contract of the impl package)
+* fixed bug where a component defined before all collections in the mapping file caused collections to not be persisted (thanks to Michael Link)
+* fixed a bug where cascaded saveOrUpdate was ignoring the unsaved-value setting
+* faster Timestamp dirty checking
+
+Changes in version 1.1.2 (29.9.2002)
+------------------------------------
+* added persister attibute of class mapping to support custom persistence strategies
+* Support for Oracle outerjoins contributed by Jon Lipsky
+* Reworked versioning, fixing bugs (and tightening tests)
+* Fixed a bug where an ObjectNotFoundException was thrown for null one-to-one associations
+* fixed problems with timestamps introduced in 1.1.1
+* added batch file for running demo
+
+Changes in version 1.1.1 (27.9.2002)
+------------------------------------
+* Major refactoring / abstraction of persistence logic
+* added maxIndex, minIndex, maxElement, minElement properties for collections
+* added support for class names in where clause of queries
+* fixed a bug where an association could become null after caching
+* fixed a bug where an NPE could occur for a null component
+* fixed minor bugs in SortedMap, SortedSet
+* object type is now cacheable
+* added big_integer type
+* improved dirty checking for timestamp type
+
+Changes in version 1.1.0 (22.9.2002)
+------------------------------------
+* implemented collection indexing with [] in query language
+* fixed some minor query-language bugs
+
+Changes in version 1.1 beta 14 (19.9.2002)
+------------------------------------------
+* bags now implement java.util.List
+* delete() may now take a transient object
+* bug where sorted collections were not being sorted fixed by Brad Clow
+* fixed a bug in many-to-many association filtering
+* no longer try to query connection metadata when using user-supplied connections
+* added hibernate.use_scrollable_resultsets for user-supplied connections
+* fixed a problem where sublists were not being proxied
+* fixed a problem where Hibernate could not call methods of package-visibility classes
+* removed obsolete select attribute from MapGenerator
+* multiple occurrences of same path in a query no longer require multiple joins
+* added WrongClassException
+
+Changes in version 1.1 beta 13 (15.9.2002)
+------------------------------------------
+* added constants to Lifecycle interface
+* fix for circular cascade="save/update"
+* fixed a bug in cascaded update introduced in version 1.1 beta 11
+* added object type
+
+Changes in version 1.1 beta 12 (14.9.2002)
+------------------------------------------
+* Session.filter() for applying a filter query to collections
+* experimental ODMG API (OQL features are not yet compliant)
+* new DBCPConnectionProvider for Apache commons-dbcp connection pool
+* Session.lock() now does version number check even on databases with no FOR UPDATE clause
+* introduced new cascade styles: cascade="save/update", cascade="delete"
+* added default-cascade attribute
+* foreign key columns lengths now automatically set to primary key column lengths for SchemaExport
+* added error checking of row update counts when batching disabled
+* major improvements to ProxyGenerator tool
+* CodeGenerator now aware of proxy attribute
+* integrated PointbaseDialect contributed by Ed Mackenzie
+* fix for problem where Proxies were being initialized on identifier access by Christoph Sturm
+
+Changes in version 1.1 beta 11 (7.9.2002)
+-----------------------------------------
+* deprecated update() in favor of saveOrUpdate() and introduced unsaved-value attribute of <id>
+* children mapped with cascade="all" are now always saved/updated even without a call to update(parent)
+* support for composite-id classes where the composite id consists of properties of the persistent class
+* added constrained attribute to <one-to-one> element
+* added Validatable interface
+* renamed several config properties (Hibernate issues log warnings for obsolete property usage)
+* arbitrary JDBC connection properties may now be passed using hibernate.connection.*
+* fixed a classloading bug in C3P0ConnectionProvider (introduced in 1.1 beta 10)
+* CodeGenerator may now take multiple mapping files on the commandline
+
+Changes in version 1.1 beta 10 (28.8.2002)
+------------------------------------------
+* fixed a bug that occurred when calling Session.update() for an object with no properties
+* changed class loading to use the context classloader first
+* introduced <timestamp> as an alternative to <version>
+* added Query.getReturnTypes()
+* fixed a bug with composite-elements introduced in 1.1 beta 7
+* save() may now be used to persist classes with composite-ids
+* improved handling of nanoseconds values in Timestamps
+* support for composite id properties + objects in select clause of iterate()
+* beefed-up collection tests
+
+Changes in version 1.1 beta 9 (26.8.2002)
+-----------------------------------------
+* fixed a bug introduced in 1.1 beta 8 that could cause an NPE after deserializing a session with proxies
+* deprecated insert() in favor of more flexible save()
+* deprecated IDGenerator in favor of new IdentifierGenerator interface
+* "assigned" id generator now returns the existing value of the id property instead of throwing an Exception
+* fixed a problem where PreparedStatements were not being recached after retrieving a natively generated id
+
+Changes in version 1.1 beta 8 (25.8.2002)
+-----------------------------------------
+* fixed a bug introduced in 1.1 beta 6 where an updated element of an indexed one-to-many collection caused an SQLException
+* uninitialized collections passed to update() may now be initialized in the new Session
+* uninitialized proxies passed to update() may now be initialized in the new Session
+
+Changes in version 1.1 beta 7 (23.8.2002)
+-----------------------------------------
+* fixed a bug where Hibernate was not returning statements to the cache when batch updates were disabled
+* fixed a bad bug parsing mappings with toplevel one-to-many associations
+* fixed a bug with versioning and subcollections
+* reworked Set updates again for much improved efficiency
+* schema export now creates primary keys for indexed collection tables
+* minor refactor to Type hierarchy
+* improved some user-error detection
+* fixed foreign key constraint creation for MySQL with Innodb tables
+
+Changes in version 1.1 beta 6b (20.8.2002)
+------------------------------------------
+* Fixed a problem updating Sets
+* added <bag> mapping for java.util.Collection
+
+Changes in version 1.1 beta 6 (20.8.2002)
+-----------------------------------------
+* completely reworked fetching code
+- one-to-many associations now always fetched in a single select
+- many-to-many associations fetched in a single select when outerjoin fetching is enabled
+- this includes nested outerjoin fetching of the associated class!
+- outerjoin fetching for <many-to-one> nested inside <component> or <composite-element>
+- code refactored to be cleaner and faster
+* removed unnecessary order by clause in List and array fetching SQL
+* collections now individually update, insert and delete only rows that changed (thanks to Doug Currie)
+* fixed a problem where exceptions were being wrapped in a LazyInitializationException for non-lazy collections
+* added order-by attribute to <set> and <map> to specify a table column as defining the iteration order (JDK1.4 only)
+* improved error detection in Session.update()
+* further usage of JDBC2 batch updates
+* some fine-tuning of JDBC2 feature usage configuration
+* CodeGenerator will now generate components and arrays
+* fixed problem where CodeGenerator could not generate classes in the default package
+* improved logging of flush() activity
+* renamed property hibernate.use_jdbc2 to hibernate.use_jdbc_batch
+
+Changes in version 1.1 beta 5 (13.8.2002)
+-----------------------------------------
+* hibernate.query.imports property to allow use of unqualified classnames in queries
+* fixed a bug in collection flushing that was introduced in 1.1 beta 4
+
+Changes in version 1.1 beta 4 (11.8.2002)
+-----------------------------------------
+* JMX integration (thanks to John Urberg)
+* "having" clause in query language
+
+Changes in version 1.1 beta 3 (10.8.2002)
+-----------------------------------------
+* removed the select="all" attribute for <class> mappings - "select distinct" now specified in the hibernate query
+* system properties now override hibernate.properties
+* Session now flushes changes even less often (only when actual updates to the queried table(s) are waiting)
+* fixed a *very* rare problem where an unnecessary update could be accidently issued before a delete
+
+Changes in version 1.1 beta 2 (6.8.2002)
+----------------------------------------
+* fixed a bug exporting schemas with identity columns
+* implemented factory-level caching of collections
+* Datastore.storeJar() contributed by Christian Meunier
+* added <mapping jar="jarfile"> to hibernate.cfg.xml
+
+Changes in version 1.1 beta 1 (4.8.2002)
+----------------------------------------
+* new Query API including named parameters, pageable results
+* subqueries in Hibernate queries (only for databases that support subselects)
+* new DocBook documentation (contributed by Christian Bauer)
+* support collections .elements, .indices inside select clause (even in aggregate functions)
+* don't load collections before removal unless absolutely necessary
+* mutable="false" attribute in <class> element to map immutable classes
+* use JDBC batch to insert collection elements if hibernate.use_jdbc2 is set
+* brand new PreparedStatementCache
+* improvements to MYSQL dialect for long datatypes
+* always check isAccessible() before setAccessible(true)
+* removed extra unnecessary table join in queries with one-to-many association
+* removed ugly "WHERE 1=1" from generated SQL
+* fixed exception mapping a class with no properties (fix by Rob Stokes)
+* logging enhancements including SQLException logging
+* reworked factory-level cache and integrated JCS support (thanks to Christian Meunier)
+* fixed a bug with circular references in cached data
+* removed blocking cache support
+* now rendering outerjoins as "LEFT OUTER JOIN" because "LEFT JOIN" caused problems for some Sybase versions
+* added default Hibernate properties to Dialects
+* native id generation now falls back to sequence id generation when identity columns not supported by the dialect
+* fixed some problems with native id generation under HSQL
+* may now use Session.insert() even when using native id generation
+
+Changes in version 1.0.1b (18.7.2002)
+-------------------------------------
+* fixed a bad bug in query parser when hibernate.query.substitutions was unset
+* much improved build.xml Ant script
+* latest c3p0.jar
+
+Changes in version 1.0.1 (17.7.2002)
+------------------------------------
+* enabled use of scalar values and aggregate SQL functions in select clause of iterate() queries
+* fixed bug in JNDI lookup for SessionFactory
+* changed ordering of SQL inserts/deletes for child collections of a cascade-enabled association
+- better behaviour for some not-null constraints
+- performance optimization for bidirectional many-to-one associations
+* added hibernate.query.substitutions property to allow named query constants (eg. translate 'true' to '1')
+* added locale type for java.util.Locale
+* added sequence hi/lo generator (seqhilo.long)
+* fixed bug where load(), onLoad() callbacks were sometimes called at wrong time
+* fixed an exception (fix by Eric Everman) and improved identifier searching in MapGenerator tool
+* refactored SerializableType
+* extra logging + error handling
+* documentation enhancements
+
+Changes in version 0.9.17 (3.7.2002)
+------------------------------------
+* Added UserType interface
+* documented Lifecycle
+* added some new trace messages to log
+* bugfix to allow SQL functions like upper(), lower(), etc to work on all platforms
+* documented SAP DB support (dialect contributed by Brad Clow)
+* foreign key constraint export for SAP DB
+* map index may be the composite-id of the element class (contributed by Jon Lipsky)
+* fixes to CodeGenerator tool (contributed by Uros Jurglic)
+
+Changes in version 0.9.16 (19.6.2002)
+------------------------------------
+* fixed bug cacheing objects with references to themselves
+* support for composite ids of classes with no id property
+* may now disable outer join (deep) fetching for an association by setting outer-join="false"
+* enabled outer join fetching for one-to-one
+* fixed a bug for mappings that specify class attribute of <one-to-many>
+* fixed a bug where Hashbelt did not expire cached data in a timely fashion
+* fixed a mistake in the mapping DTD
+* new user-error check in update()
+
+Changes in version 0.9.15 (15.6.2002)
+------------------------------------
+* one-to-one associations
+* support for "tricky" mappings in SchemaExport tool (multiple properties to one column, etc)
+* Transaction API contributed by Anton van Straaten
+* SessionFactory may be bound to JNDI name by setting hibernate.session_factory_name
+* Sessions are now Serializable!
+* added Session.findIdentifiers() query methods
+* new Lifecycle interface to replace deprecated PersistentLifecycle
+* fixed problem where session did not autoflush on iterate() queries
+* performance enhancements to collection dirty checking
+* added Hibernate.configure() and configuration file format
+* removed some deprecated methods
+* refactored Type hierarchy
+* query language identifiers now case sensitive (bugfix for case sensitive SQL dialects)
+* username/password now optional for datasource (contributed by Emmanuel Bourg)
+* much improved API documentation
+* binary types now saved using streams if hibernate.use_streams_for_binary=true (contributed by Jon Lipsky)
+* MySQL Strings now mapped to TEXT columns if length > 255 (contributed by Christoph Beck)
+
+Changes in version 0.9.14 (4.6.2002)
+-------------------------------------
+* lifecycle objects - properties now have a cascade attribute to cascade save, update, delete
+* composite id properties may now be used in queries eg. foo.id.bar (contributed by Jon Lipsky)
+* slightly changed semantics of update() so it now also save()s new transient instances
+* Session now flushes() itself less often before query execution (performance enhancement)
+* fixed problem where Session.save() returned null instead of the natively generated id
+* fixed bug with object identity for cached classes
+* fixed bug where delete(x) could not be called after update(x)
+* MUCH improved Exception hierarchy
+* deprecated create()
+* added sql-type attribute to <column> tag to allow user to override default type mapping
+* deeper fetching with use_outer_join
+* new ConnectionProvider framework
+* fixed a bug where blocking cache could return stale data
+* now working again in JDK1.2.2
+* fixed problem with not-null associations + native key generation
+* minor changes to PersistentLifecycle interface
+* initial, minimal version of new Transaction mechanism
+* MUCH improved documentation
+
+Changes in version 0.9.13 (25.5.2002)
+-------------------------------------
+* Datastore.storeResource() to load mapping files from classpath
+* fixed a problem executing under JDK1.3 when compiled from JDK1.4
+* documentation improvements
+
+Changes in version 0.9.12 (24.5.2002)
+------------------------------------
+* Session.update() methods to update a persistent instance from transient copy (as requested by many users)
+* discriminator column name, type, length, etc now configurable by <discriminator> tag in mapping file
+* discriminator column values configurable by discriminator-value attribute of <class> and <subclass> tags
+* added Session.insert(object, id) for classes with no identifier property
+* fixed another bad bug with connection handling (fix by Anton van Straaten)
+* fixed a problem with deferred loading
+* fixed a problem with sorted collections (fix by Anton van Straaten)
+* nested collections of objects now require 2 SQL SELECTs to load, rather than size+1
+* session is NO LONGER atomic - application should discard session when exception occurs
+* fixed problem where character type was mapped to VARCHAR column
+* arrays of proxies now possible by using new element-class attribute of <array> tag
+* fixed various problems with proxies
+* added proxy generation tool
+* proxy unit tests
+* replaced two RuntimeExceptions with checked exceptions
+* made hibernate.username/hibernate.password optional for DriverManager
+* CodeGenerator now supports all hibernate basic types
+* much improved caching algorithm for compiled queries
+* may now specify properties simply by placing hibernate.properties in classpath
+* documentation improvements + fixes
+* --abstract switch to MapGenerator (contributed by Eric Everman)
+
+Changes in version 0.9.11 (12.5.2002)
+------------------------------------
+* fixed major bug with connection handling (fix by Anton van Straaten)
+
+Changes in version 0.9.10 (11.5.2002)
+------------------------------------
+* set a default schema name using SessionFactory property hibernate.default_schema
+* code generator tool contributed by Brad Clow (www.workingmouse.com)
+* lazy object initialization under JDK 1.3 and above
+* fixed some error messages to go to logging framework, not stdout
+* new system property hibernate.show_sql=true logs all executed SQL to stdout
+* integration of bugfixes in c3p0
+* wrap IllegalArgumentExceptions in HibernateExceptions
+* added ObjectNotFoundException and StaleObjectStateException
+* fixed a bug when using schemas
+* new caching strategy (and documented cache feature)
+
+Changes in version 0.9.9 (25.4.2002)
+-----------------------------------
+* sorted sets and maps (thanks to Doug Currie)
+* mapping files may now be loaded using getResourceAsStream() (thanks to Markus Meissner)
+* hibernate messages now logged by Apache commons-logging
+* default hi/lo generator table now has column named "next_id", instead of "next"
+* query language may now refer to identifier property name (eg. foo.fooKey as alternative to foo.id)
+* hibernate.jndi_class, hibernate.jndi_url now optional when using datasource
+* hibernate now throws an exception if you try to persist an object with a reference to a transient object
+* improved connection pooling algorithm (hibernate.pool_size limits pooled conections)
+* very experimental integration of c3p0 JDBC connection pool (http://sourceforge.net/projects/c3p0)
+* now compiles under JDK 1.2.2
+* fixed bug persisting null components
+* fixed bug where cached prepared statements were not cleaned up after disconnect() session
+* fixed a null pointer exception in MappingByReflection
+
+Changes in version 0.9.8 (13.3.2002)
+-----------------------------------
+* supports database native key generation in Sybase, MS SQL, MySQL, DB2, Hypersonic (contributed by Christoph Sturm)
+* supports Mckoi (dialect contributed by Doug Currie)
+* supports Progress (dialect contributed by Phillip Baird)
+* added exceptions to catch Session reentrancy from PersistentLifecycle.load() + store()
+* experimental cross-transaction cache
+* Session.lock() and Session.loadWithLock() for pessimistic locking
+* HiLoGenerators may now use their own DriverManager connection properties + may now use same table across diff mapping files
+* Session.flush(), Session.close() and Session.connection() replace Session.commit(), Session.cancel()
+* Session.disconnect() and Session.reconnect() for long transactions
+* added single JVM id generators vm.long, vm.hex
+* added unique column constraints to mappings
+* extensions to IDGenerator framework
+* support sequence-style ID generation in Oracle, PostgreSQL, DB2, Interbase
+
+* fixed problem where subcollections of a collection that changed roles would be deleted
+* changed class loading strategy to be compatible with JBoss
+* stopped queries retrieving unnecessary columns
+* mutable types (binary + serializable) now always detected as dirty
+
+Changes in version 0.9.7 (26.2.2002)
+-----------------------------------
+* save() now safe from foreign key violations (so create() is no longer preferred method of adding data)
+* delete() now completely safe from foreign key violations - it no longer matters what order objects are deleted in
+* removed Session.copy()
+* hilo generators now NOT for use with application server datasources
+
+* fixed two intermittent bugs in queries
+* fixed a problem where components not detected as dirty
+* fixed broken hilo generator which was not updating database
+* fixed a minor bug when hibernate.use_outer_join was set
+
+Changes in version 0.9.6 (24.2.2002)
+-----------------------------------
+* experimental XML generation
+* added support for bi-directional associations (one-to-set, set-to-set) with <set readonly="true"> config
+* reflective generation of mappings tool was contributed by Doug Currie
+* Session operations now atomic, so exceptions are recoverable
+* made ID properties optional in persistent classes
+* support for multiple schemas through schema attribute of <hibernate-mapping>, <class>, <set>, <map>, etc.
+* auto-creation of tables for hilo id generators (restriction: cannot use same table from more than one mapping file)
+* added some more assertions to catch user "mistakes" like deleting transient or saving persistent objects
+
+* major rework of collections and fixed some bad bugs
+* lazy initialization re-enabled for one-to-many associations (thanks to Georg Schneemayer)
+* fixed a problem in the mapping DTD to allow nested components in collections
+* fixed a BAD bug in RelationalDatabaseSession when loading objects with PersistentLifecycle callbacks (thanks to Paul Szego)
+* fixed problems with quoted strings in query language
+* fixed a bug where a stack overflow occurred instead of HibernateException thrown (thanks to Georg Schneemayer)
+* fixed a bug deleting updated versioned data
+* fixed some problems with name generation for indexes + foreign keys
+* fixed problem in Sun JDK 1.4 (only?) where IllegalArgumentException was not handled
+* minor improvements to handling of dates and times
+* HiLoGenerator now safe for all transaction isolation levels + safe when rollback occurs
+* noticed and fixed obscure piece of nonthreadsafe code outside of core persistence engine
+* removed unnecessary drop constraints for some dialects
+
+* MUCH more comprehensive test suite
+
+* changed some terminology used in documentation
+* added javadoc for API classes
+* commented the mapping DTD
+
+Changes in version 0.9.5 (8.2.2002)
+-----------------------------------
+* supports HypersonicSQL (dialect contributed by Phillip Baird)
+* supports Microsoft SQL server (with third party JDBC driver)
+* proper command-line tool for schema generation and export
+* deprecated the interface cirrus.hibernate.Persistent (due to popular demand)
+* changes to hibernate-mapping DTD (required to support optional Persistent interface):
+- deprecated <property type="package.PersistentClassName"/> in favor of <many-to-one class="package.PersistentClassName"/>
+- deprecated <element type="package.PersistentClassName"/> in favor of <many-to-many class="package.PersistentClassName"/>
+- deprecated <property role="..."/> in favor of <collection role="..."/>
+- deprecated <element role=".."/> in favor of <subcollection role="..."/>
+- deprecated <association> in favor of <one-to-many>
+* class attribute optional in <component> and <composite-id> tags (determined by reflection)
+* querying components of components now supported
+* one-shot table creation (no use of unportable "alter table")
+* time dataype support
+* reflective mappings of java.sql.Time, java.sql.Timestamp, java.sql.Date
+* fixed error msg thrown when class is missing a method but has a superclass
+* property names now conform to JavaBean spec ("foo" instead of "Foo"). Note that "Foo" still works
+* constructors of persistent classes may now be non-public
+* collection indexes now mapped to not-null columns
+* fixed obscure bug with querying collections inside components of components
+* fixed potential bug related to cacheing of compiled queries
+* major rewrite of code relating to O-R mappings
+* Session.copy() and Session.equals() as convenience for users
+* fixed repeated invocations of hasNext() on iterator + iterators now always work with distinct SQL resultsets
+* McKoi dialect was contributed by Gabe Hicks
+
+Changes in version 0.9.4 (29.1.2002)
+------------------------------------
+* fixed BAD bug where XML parsing would not work for parsers other than Xerces - thanks to Christian Winkler
+* added some more assertions to catch user "mistakes" like changing ids or reusing existing ids
+
+Changes in version 0.9.3 (27.1.2002)
+------------------------------------
+* repackaged (corrupted DatasourceConnectionProvider.class)
+* better exception reporting using datasource
+* added Datastore.storeClass() which looks for mapping file in classpath (class foo.Bar -> foo/Bar.hbm.xml)
+* improved documentation
+
+Changes in version 0.9.2 (25.1.2002)
+------------------------------------
+* iterate over query results (lazy instantiation of query results)
+* added "select foo, bar" style queries returning multiple objects per row
+* delete by query
+* composite key support
+* outer joins for faster (?) loading of associated objects ( set "hibernate.use_outer_join" to "true" )
+* connection pooling when using DriverManager
+* foreign key constraint from unkeyed collection table to owner entity table
+* improved drop tables script execution (still not infallible)
+* added <composite-element> tag
+* added not-null properties and elements
+* added an optimisation for dates and components
+* made some XML attributes optional
+* fixed errors in documentation + documented some extra features
+* bugfix: store() not getting called on lifecycle interface
+* bugfix: schema generation for indexed associations
+* added many tests
+
+Changes in version 0.9.1 (20.1.2002)
+------------------------------------
+Too many to list
+
+version 0.8.1
+-------------
+Initial alpha version
+
Deleted: core/tags/hibernate-3.3.1.GA/connection-c3p0/pom.xml
===================================================================
--- core/branches/Branch_3_3/connection-c3p0/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/connection-c3p0/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,31 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-c3p0</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate C3P0 ConnectionProvider</name>
- <description>C3P0-based implementation of the Hibernate ConnectionProvder contract</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>c3p0</groupId>
- <artifactId>c3p0</artifactId>
- <version>0.9.1</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/connection-c3p0/pom.xml (from rev 15183, core/branches/Branch_3_3/connection-c3p0/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/connection-c3p0/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/connection-c3p0/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,31 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-c3p0</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate C3P0 ConnectionProvider</name>
+ <description>C3P0-based implementation of the Hibernate ConnectionProvder contract</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>c3p0</groupId>
+ <artifactId>c3p0</artifactId>
+ <version>0.9.1</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/connection-proxool/pom.xml
===================================================================
--- core/branches/Branch_3_3/connection-proxool/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/connection-proxool/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,31 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-proxool</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate Proxool ConnectionProvider</name>
- <description>Proxool-based implementation of the Hibernate ConnectionProvder contract</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>proxool</groupId>
- <artifactId>proxool</artifactId>
- <version>0.8.3</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/connection-proxool/pom.xml (from rev 15183, core/branches/Branch_3_3/connection-proxool/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/connection-proxool/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/connection-proxool/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,31 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-proxool</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate Proxool ConnectionProvider</name>
+ <description>Proxool-based implementation of the Hibernate ConnectionProvder contract</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>proxool</groupId>
+ <artifactId>proxool</artifactId>
+ <version>0.8.3</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/core (from rev 15151, core/branches/Branch_3_3/core)
Deleted: core/tags/hibernate-3.3.1.GA/core/pom.xml
===================================================================
--- core/branches/Branch_3_3/core/pom.xml 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,138 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate Core</name>
- <description>The core functionality of Hibernate</description>
-
- <dependencies>
- <dependency>
- <groupId>antlr</groupId>
- <artifactId>antlr</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- </dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- </dependency>
-
- <dependency>
- <!-- YUCK, YUCK, YUCK!!!! -->
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>javax.security</groupId>
- <artifactId>jaas</artifactId>
- <version>1.0.01</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.security</groupId>
- <artifactId>jacc</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.6.5</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- optional deps for bytecode providers until those are finally properly scoped -->
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.GA</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-cglib-repack</artifactId>
- <version>2.1_3</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>antlr-maven-plugin</artifactId>
- <version>${antlrPluginVersion}</version>
- <configuration>
- <grammars>hql.g,hql-sql.g,sql-gen.g</grammars>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>antlr-maven-plugin</artifactId>
- <version>${antlrPluginVersion}</version>
- <configuration>
- <!-- eventually should be based on the second phase grammar -->
- <grammars>hql.g</grammars>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <!--
- for the time being, gonna ignore the custom stylesheet (what did it do anyway???)
- <stylesheetfile>xyz</stylesheetfile>
- -->
- <groups>
- <group>
- <title>Core API</title>
- <packages>org.hibernate:org.hibernate.classic:org.hibernate.criterion:org.hibernate.metadata:org.hibernate.cfg:org.hibernate.usertype</packages>
- </group>
- <group>
- <title>Extension API</title>
- <packages>org.hibernate.id:org.hibernate.connection:org.hibernate.transaction:org.hibernate.type:org.hibernate.dialect*:org.hibernate.cache*:org.hibernate.event*:org.hibernate.action:org.hibernate.property:org.hibernate.loader*:org.hibernate.persister*:org.hibernate.proxy:org.hibernate.tuple:org.hibernate.transform:org.hibernate.collection:org.hibernate.jdbc</packages>
- </group>
- <group>
- <title>Miscellaneous API</title>
- <packages>org.hibernate.stat:org.hibernate.tool.hbm2ddl:org.hibernate.jmx:org.hibernate.mapping:org.hibernate.tool.instrument</packages>
- </group>
- <group>
- <title>Internal Implementation</title>
- <packages>org.hibernate.engine:org.hibernate.impl:org.hibernate.sql:org.hibernate.lob:org.hibernate.util:org.hibernate.exception:org.hibernate.hql:org.hibernate.hql.ast:org.hibernate.hql.antlr:org.hibernate.hql.classic:org.hibernate.intercept:org.hibernate.secure:org.hibernate.pretty</packages>
- </group>
- </groups>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
-
- <properties>
- <antlrPluginVersion>2.1</antlrPluginVersion>
- </properties>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/core/pom.xml (from rev 15183, core/branches/Branch_3_3/core/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,138 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate Core</name>
+ <description>The core functionality of Hibernate</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <!-- YUCK, YUCK, YUCK!!!! -->
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.security</groupId>
+ <artifactId>jaas</artifactId>
+ <version>1.0.01</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.security</groupId>
+ <artifactId>jacc</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- optional deps for bytecode providers until those are finally properly scoped -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-cglib-repack</artifactId>
+ <version>2.1_3</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>antlr-maven-plugin</artifactId>
+ <version>${antlrPluginVersion}</version>
+ <configuration>
+ <grammars>hql.g,hql-sql.g,sql-gen.g</grammars>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>antlr-maven-plugin</artifactId>
+ <version>${antlrPluginVersion}</version>
+ <configuration>
+ <!-- eventually should be based on the second phase grammar -->
+ <grammars>hql.g</grammars>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <!--
+ for the time being, gonna ignore the custom stylesheet (what did it do anyway???)
+ <stylesheetfile>xyz</stylesheetfile>
+ -->
+ <groups>
+ <group>
+ <title>Core API</title>
+ <packages>org.hibernate:org.hibernate.classic:org.hibernate.criterion:org.hibernate.metadata:org.hibernate.cfg:org.hibernate.usertype</packages>
+ </group>
+ <group>
+ <title>Extension API</title>
+ <packages>org.hibernate.id:org.hibernate.connection:org.hibernate.transaction:org.hibernate.type:org.hibernate.dialect*:org.hibernate.cache*:org.hibernate.event*:org.hibernate.action:org.hibernate.property:org.hibernate.loader*:org.hibernate.persister*:org.hibernate.proxy:org.hibernate.tuple:org.hibernate.transform:org.hibernate.collection:org.hibernate.jdbc</packages>
+ </group>
+ <group>
+ <title>Miscellaneous API</title>
+ <packages>org.hibernate.stat:org.hibernate.tool.hbm2ddl:org.hibernate.jmx:org.hibernate.mapping:org.hibernate.tool.instrument</packages>
+ </group>
+ <group>
+ <title>Internal Implementation</title>
+ <packages>org.hibernate.engine:org.hibernate.impl:org.hibernate.sql:org.hibernate.lob:org.hibernate.util:org.hibernate.exception:org.hibernate.hql:org.hibernate.hql.ast:org.hibernate.hql.antlr:org.hibernate.hql.classic:org.hibernate.intercept:org.hibernate.secure:org.hibernate.pretty</packages>
+ </group>
+ </groups>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <properties>
+ <antlrPluginVersion>2.1</antlrPluginVersion>
+ </properties>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cache/QueryKey.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/cache/QueryKey.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cache/QueryKey.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,141 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.cache;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.Set;
-
-import org.hibernate.EntityMode;
-import org.hibernate.engine.QueryParameters;
-import org.hibernate.engine.RowSelection;
-import org.hibernate.transform.ResultTransformer;
-import org.hibernate.type.Type;
-import org.hibernate.util.EqualsHelper;
-
-/**
- * A key that identifies a particular query with bound parameter values
- * @author Gavin King
- */
-public class QueryKey implements Serializable {
- private final String sqlQueryString;
- private final Type[] types;
- private final Object[] values;
- private final Integer firstRow;
- private final Integer maxRows;
- private final Map namedParameters;
- private final EntityMode entityMode;
- private final Set filters;
- private final int hashCode;
-
- // the user provided resulttransformer, not the one used with "select new". Here to avoid mangling transformed/non-transformed results.
- private final ResultTransformer customTransformer;
-
- public QueryKey(String queryString, QueryParameters queryParameters, Set filters, EntityMode entityMode) {
- this.sqlQueryString = queryString;
- this.types = queryParameters.getPositionalParameterTypes();
- this.values = queryParameters.getPositionalParameterValues();
- RowSelection selection = queryParameters.getRowSelection();
- if (selection!=null) {
- firstRow = selection.getFirstRow();
- maxRows = selection.getMaxRows();
- }
- else {
- firstRow = null;
- maxRows = null;
- }
- this.namedParameters = queryParameters.getNamedParameters();
- this.entityMode = entityMode;
- this.filters = filters;
- this.customTransformer = queryParameters.getResultTransformer();
- this.hashCode = getHashCode();
- }
-
- public boolean equals(Object other) {
- if (!(other instanceof QueryKey)) return false;
- QueryKey that = (QueryKey) other;
- if ( !sqlQueryString.equals(that.sqlQueryString) ) return false;
- if ( !EqualsHelper.equals(firstRow, that.firstRow) || !EqualsHelper.equals(maxRows, that.maxRows) ) return false;
- if ( !EqualsHelper.equals(customTransformer, that.customTransformer) ) return false;
- if (types==null) {
- if (that.types!=null) return false;
- }
- else {
- if (that.types==null) return false;
- if ( types.length!=that.types.length ) return false;
- for ( int i=0; i<types.length; i++ ) {
- if ( types[i].getReturnedClass() != that.types[i].getReturnedClass() ) return false;
- if ( !types[i].isEqual( values[i], that.values[i], entityMode ) ) return false;
- }
- }
- if ( !EqualsHelper.equals(filters, that.filters) ) return false;
- if ( !EqualsHelper.equals(namedParameters, that.namedParameters) ) return false;
- return true;
- }
-
- public int hashCode() {
- return hashCode;
- }
-
- private int getHashCode() {
- int result = 13;
- result = 37 * result + ( firstRow==null ? 0 : firstRow.hashCode() );
- result = 37 * result + ( maxRows==null ? 0 : maxRows.hashCode() );
- for ( int i=0; i<values.length; i++ ) {
- result = 37 * result + ( values[i]==null ? 0 : types[i].getHashCode( values[i], entityMode ) );
- }
- result = 37 * result + ( namedParameters==null ? 0 : namedParameters.hashCode() );
- result = 37 * result + ( filters==null ? 0 : filters.hashCode() );
- result = 37 * result + ( customTransformer==null ? 0 : customTransformer.hashCode() );
- result = 37 * result + sqlQueryString.hashCode();
- return result;
- }
-
- public String toString() {
- StringBuffer buf = new StringBuffer()
- .append("sql: ")
- .append(sqlQueryString);
- if (values!=null) {
- buf.append("; parameters: ");
- for (int i=0; i<values.length; i++) {
- buf.append( values[i] )
- .append(", ");
- }
- }
- if (namedParameters!=null) {
- buf.append("; named parameters: ")
- .append(namedParameters);
- }
- if (filters!=null) {
- buf.append("; filters: ")
- .append(filters);
- }
- if (firstRow!=null) buf.append("; first row: ").append(firstRow);
- if (maxRows!=null) buf.append("; max rows: ").append(maxRows);
- if (customTransformer!=null) buf.append("; transformer: ").append(customTransformer);
- return buf.toString();
- }
-
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cache/QueryKey.java (from rev 15175, core/branches/Branch_3_3/core/src/main/java/org/hibernate/cache/QueryKey.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cache/QueryKey.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cache/QueryKey.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,152 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.cache;
+
+import java.io.Serializable;
+import java.io.IOException;
+import java.util.Map;
+import java.util.Set;
+
+import org.hibernate.EntityMode;
+import org.hibernate.engine.QueryParameters;
+import org.hibernate.engine.RowSelection;
+import org.hibernate.transform.ResultTransformer;
+import org.hibernate.type.Type;
+import org.hibernate.util.EqualsHelper;
+
+/**
+ * A key that identifies a particular query with bound parameter values
+ * @author Gavin King
+ */
+public class QueryKey implements Serializable {
+ private final String sqlQueryString;
+ private final Type[] types;
+ private final Object[] values;
+ private final Integer firstRow;
+ private final Integer maxRows;
+ private final Map namedParameters;
+ private final EntityMode entityMode;
+ private final Set filters;
+
+ // the user provided resulttransformer, not the one used with "select new". Here to avoid mangling transformed/non-transformed results.
+ private final ResultTransformer customTransformer;
+
+ /**
+ * For performance reasons, the hashCode is cached; however, it is marked transient so that it can be
+ * recalculated as part of the serialization process which allows distributed query caches to work properly.
+ */
+ private transient int hashCode;
+
+ public QueryKey(String queryString, QueryParameters queryParameters, Set filters, EntityMode entityMode) {
+ this.sqlQueryString = queryString;
+ this.types = queryParameters.getPositionalParameterTypes();
+ this.values = queryParameters.getPositionalParameterValues();
+ RowSelection selection = queryParameters.getRowSelection();
+ if (selection!=null) {
+ firstRow = selection.getFirstRow();
+ maxRows = selection.getMaxRows();
+ }
+ else {
+ firstRow = null;
+ maxRows = null;
+ }
+ this.namedParameters = queryParameters.getNamedParameters();
+ this.entityMode = entityMode;
+ this.filters = filters;
+ this.customTransformer = queryParameters.getResultTransformer();
+ this.hashCode = generateHashCode();
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
+ in.defaultReadObject();
+ this.hashCode = generateHashCode();
+ }
+
+ private int generateHashCode() {
+ int result = 13;
+ result = 37 * result + ( firstRow==null ? 0 : firstRow.hashCode() );
+ result = 37 * result + ( maxRows==null ? 0 : maxRows.hashCode() );
+ for ( int i=0; i<values.length; i++ ) {
+ result = 37 * result + ( values[i]==null ? 0 : types[i].getHashCode( values[i], entityMode ) );
+ }
+ result = 37 * result + ( namedParameters==null ? 0 : namedParameters.hashCode() );
+ result = 37 * result + ( filters==null ? 0 : filters.hashCode() );
+ result = 37 * result + ( customTransformer==null ? 0 : customTransformer.hashCode() );
+ result = 37 * result + sqlQueryString.hashCode();
+ return result;
+ }
+
+ public int hashCode() {
+ return hashCode;
+ }
+
+ public boolean equals(Object other) {
+ if (!(other instanceof QueryKey)) return false;
+ QueryKey that = (QueryKey) other;
+ if ( !sqlQueryString.equals(that.sqlQueryString) ) return false;
+ if ( !EqualsHelper.equals(firstRow, that.firstRow) || !EqualsHelper.equals(maxRows, that.maxRows) ) return false;
+ if ( !EqualsHelper.equals(customTransformer, that.customTransformer) ) return false;
+ if (types==null) {
+ if (that.types!=null) return false;
+ }
+ else {
+ if (that.types==null) return false;
+ if ( types.length!=that.types.length ) return false;
+ for ( int i=0; i<types.length; i++ ) {
+ if ( types[i].getReturnedClass() != that.types[i].getReturnedClass() ) return false;
+ if ( !types[i].isEqual( values[i], that.values[i], entityMode ) ) return false;
+ }
+ }
+ if ( !EqualsHelper.equals(filters, that.filters) ) return false;
+ if ( !EqualsHelper.equals(namedParameters, that.namedParameters) ) return false;
+ return true;
+ }
+
+ public String toString() {
+ StringBuffer buf = new StringBuffer()
+ .append("sql: ")
+ .append(sqlQueryString);
+ if (values!=null) {
+ buf.append("; parameters: ");
+ for (int i=0; i<values.length; i++) {
+ buf.append( values[i] )
+ .append(", ");
+ }
+ }
+ if (namedParameters!=null) {
+ buf.append("; named parameters: ")
+ .append(namedParameters);
+ }
+ if (filters!=null) {
+ buf.append("; filters: ")
+ .append(filters);
+ }
+ if (firstRow!=null) buf.append("; first row: ").append(firstRow);
+ if (maxRows!=null) buf.append("; max rows: ").append(maxRows);
+ if (customTransformer!=null) buf.append("; transformer: ").append(customTransformer);
+ return buf.toString();
+ }
+
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cfg/Environment.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environment.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cfg/Environment.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,725 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.cfg;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.sql.Connection;
-import java.sql.Statement;
-import java.sql.Timestamp;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.hibernate.HibernateException;
-import org.hibernate.bytecode.BytecodeProvider;
-import org.hibernate.util.ConfigHelper;
-import org.hibernate.util.PropertiesHelper;
-
-
-/**
- * Provides access to configuration info passed in <tt>Properties</tt> objects.
- * <br><br>
- * Hibernate has two property scopes:
- * <ul>
- * <li><b>Factory-level</b> properties may be passed to the <tt>SessionFactory</tt> when it
- * instantiated. Each instance might have different property values. If no
- * properties are specified, the factory calls <tt>Environment.getProperties()</tt>.
- * <li><b>System-level</b> properties are shared by all factory instances and are always
- * determined by the <tt>Environment</tt> properties.
- * </ul>
- * The only system-level properties are
- * <ul>
- * <li><tt>hibernate.jdbc.use_streams_for_binary</tt>
- * <li><tt>hibernate.cglib.use_reflection_optimizer</tt>
- * </ul>
- * <tt>Environment</tt> properties are populated by calling <tt>System.getProperties()</tt>
- * and then from a resource named <tt>/hibernate.properties</tt> if it exists. System
- * properties override properties specified in <tt>hibernate.properties</tt>.<br>
- * <br>
- * The <tt>SessionFactory</tt> is controlled by the following properties.
- * Properties may be either be <tt>System</tt> properties, properties
- * defined in a resource named <tt>/hibernate.properties</tt> or an instance of
- * <tt>java.util.Properties</tt> passed to
- * <tt>Configuration.buildSessionFactory()</tt><br>
- * <br>
- * <table>
- * <tr><td><b>property</b></td><td><b>meaning</b></td></tr>
- * <tr>
- * <td><tt>hibernate.dialect</tt></td>
- * <td>classname of <tt>org.hibernate.dialect.Dialect</tt> subclass</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.cache.provider_class</tt></td>
- * <td>classname of <tt>org.hibernate.cache.CacheProvider</tt>
- * subclass (if not specified EHCache is used)</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.connection.provider_class</tt></td>
- * <td>classname of <tt>org.hibernate.connection.ConnectionProvider</tt>
- * subclass (if not specified hueristics are used)</td>
- * </tr>
- * <tr><td><tt>hibernate.connection.username</tt></td><td>database username</td></tr>
- * <tr><td><tt>hibernate.connection.password</tt></td><td>database password</td></tr>
- * <tr>
- * <td><tt>hibernate.connection.url</tt></td>
- * <td>JDBC URL (when using <tt>java.sql.DriverManager</tt>)</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.connection.driver_class</tt></td>
- * <td>classname of JDBC driver</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.connection.isolation</tt></td>
- * <td>JDBC transaction isolation level (only when using
- * <tt>java.sql.DriverManager</tt>)
- * </td>
- * </tr>
- * <td><tt>hibernate.connection.pool_size</tt></td>
- * <td>the maximum size of the connection pool (only when using
- * <tt>java.sql.DriverManager</tt>)
- * </td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.connection.datasource</tt></td>
- * <td>databasource JNDI name (when using <tt>javax.sql.Datasource</tt>)</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.jndi.url</tt></td><td>JNDI <tt>InitialContext</tt> URL</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.jndi.class</tt></td><td>JNDI <tt>InitialContext</tt> classname</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.max_fetch_depth</tt></td>
- * <td>maximum depth of outer join fetching</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.jdbc.batch_size</tt></td>
- * <td>enable use of JDBC2 batch API for drivers which support it</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.jdbc.fetch_size</tt></td>
- * <td>set the JDBC fetch size</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.jdbc.use_scrollable_resultset</tt></td>
- * <td>enable use of JDBC2 scrollable resultsets (you only need this specify
- * this property when using user supplied connections)</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.jdbc.use_getGeneratedKeys</tt></td>
- * <td>enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve
- * natively generated keys after insert. Requires JDBC3+ driver and JRE1.4+</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.hbm2ddl.auto</tt></td>
- * <td>enable auto DDL export</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.default_schema</tt></td>
- * <td>use given schema name for unqualified tables (always optional)</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.default_catalog</tt></td>
- * <td>use given catalog name for unqualified tables (always optional)</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.session_factory_name</tt></td>
- * <td>If set, the factory attempts to bind this name to itself in the
- * JNDI context. This name is also used to support cross JVM <tt>
- * Session</tt> (de)serialization.</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.transaction.manager_lookup_class</tt></td>
- * <td>classname of <tt>org.hibernate.transaction.TransactionManagerLookup</tt>
- * implementor</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.transaction.factory_class</tt></td>
- * <td>the factory to use for instantiating <tt>Transaction</tt>s.
- * (Defaults to <tt>JDBCTransactionFactory</tt>.)</td>
- * </tr>
- * <tr>
- * <td><tt>hibernate.query.substitutions</tt></td><td>query language token substitutions</td>
- * </tr>
- * </table>
- *
- * @see org.hibernate.SessionFactory
- * @author Gavin King
- */
-public final class Environment {
-
- public static final String VERSION = "3.3.0.SP1";
-
- /**
- * <tt>ConnectionProvider</tt> implementor to use when obtaining connections
- */
- public static final String CONNECTION_PROVIDER ="hibernate.connection.provider_class";
- /**
- * JDBC driver class
- */
- public static final String DRIVER ="hibernate.connection.driver_class";
- /**
- * JDBC transaction isolation level
- */
- public static final String ISOLATION ="hibernate.connection.isolation";
- /**
- * JDBC URL
- */
- public static final String URL ="hibernate.connection.url";
- /**
- * JDBC user
- */
- public static final String USER ="hibernate.connection.username";
- /**
- * JDBC password
- */
- public static final String PASS ="hibernate.connection.password";
- /**
- * JDBC autocommit mode
- */
- public static final String AUTOCOMMIT ="hibernate.connection.autocommit";
- /**
- * Maximum number of inactive connections for Hibernate's connection pool
- */
- public static final String POOL_SIZE ="hibernate.connection.pool_size";
- /**
- * <tt>java.sql.Datasource</tt> JNDI name
- */
- public static final String DATASOURCE ="hibernate.connection.datasource";
- /**
- * prefix for arbitrary JDBC connection properties
- */
- public static final String CONNECTION_PREFIX = "hibernate.connection";
-
- /**
- * JNDI initial context class, <tt>Context.INITIAL_CONTEXT_FACTORY</tt>
- */
- public static final String JNDI_CLASS ="hibernate.jndi.class";
- /**
- * JNDI provider URL, <tt>Context.PROVIDER_URL</tt>
- */
- public static final String JNDI_URL ="hibernate.jndi.url";
- /**
- * prefix for arbitrary JNDI <tt>InitialContext</tt> properties
- */
- public static final String JNDI_PREFIX = "hibernate.jndi";
- /**
- * JNDI name to bind to <tt>SessionFactory</tt>
- */
- public static final String SESSION_FACTORY_NAME = "hibernate.session_factory_name";
-
- /**
- * Hibernate SQL <tt>Dialect</tt> class
- */
- public static final String DIALECT ="hibernate.dialect";
- /**
- * A default database schema (owner) name to use for unqualified tablenames
- */
- public static final String DEFAULT_SCHEMA = "hibernate.default_schema";
- /**
- * A default database catalog name to use for unqualified tablenames
- */
- public static final String DEFAULT_CATALOG = "hibernate.default_catalog";
-
- /**
- * Enable logging of generated SQL to the console
- */
- public static final String SHOW_SQL ="hibernate.show_sql";
- /**
- * Enable formatting of SQL logged to the console
- */
- public static final String FORMAT_SQL ="hibernate.format_sql";
- /**
- * Add comments to the generated SQL
- */
- public static final String USE_SQL_COMMENTS ="hibernate.use_sql_comments";
- /**
- * Maximum depth of outer join fetching
- */
- public static final String MAX_FETCH_DEPTH = "hibernate.max_fetch_depth";
- /**
- * The default batch size for batch fetching
- */
- public static final String DEFAULT_BATCH_FETCH_SIZE = "hibernate.default_batch_fetch_size";
- /**
- * Use <tt>java.io</tt> streams to read / write binary data from / to JDBC
- */
- public static final String USE_STREAMS_FOR_BINARY = "hibernate.jdbc.use_streams_for_binary";
- /**
- * Use JDBC scrollable <tt>ResultSet</tt>s. This property is only necessary when there is
- * no <tt>ConnectionProvider</tt>, ie. the user is supplying JDBC connections.
- */
- public static final String USE_SCROLLABLE_RESULTSET = "hibernate.jdbc.use_scrollable_resultset";
- /**
- * Tells the JDBC driver to attempt to retrieve row Id with the JDBC 3.0 PreparedStatement.getGeneratedKeys()
- * method. In general, performance will be better if this property is set to true and the underlying
- * JDBC driver supports getGeneratedKeys().
- */
- public static final String USE_GET_GENERATED_KEYS = "hibernate.jdbc.use_get_generated_keys";
- /**
- * Gives the JDBC driver a hint as to the number of rows that should be fetched from the database
- * when more rows are needed. If <tt>0</tt>, JDBC driver default settings will be used.
- */
- public static final String STATEMENT_FETCH_SIZE = "hibernate.jdbc.fetch_size";
- /**
- * Maximum JDBC batch size. A nonzero value enables batch updates.
- */
- public static final String STATEMENT_BATCH_SIZE = "hibernate.jdbc.batch_size";
- /**
- * Select a custom batcher.
- */
- public static final String BATCH_STRATEGY = "hibernate.jdbc.factory_class";
- /**
- * Should versioned data be included in batching?
- */
- public static final String BATCH_VERSIONED_DATA = "hibernate.jdbc.batch_versioned_data";
- /**
- * An XSLT resource used to generate "custom" XML
- */
- public static final String OUTPUT_STYLESHEET ="hibernate.xml.output_stylesheet";
-
- /**
- * Maximum size of C3P0 connection pool
- */
- public static final String C3P0_MAX_SIZE = "hibernate.c3p0.max_size";
- /**
- * Minimum size of C3P0 connection pool
- */
- public static final String C3P0_MIN_SIZE = "hibernate.c3p0.min_size";
-
- /**
- * Maximum idle time for C3P0 connection pool
- */
- public static final String C3P0_TIMEOUT = "hibernate.c3p0.timeout";
- /**
- * Maximum size of C3P0 statement cache
- */
- public static final String C3P0_MAX_STATEMENTS = "hibernate.c3p0.max_statements";
- /**
- * Number of connections acquired when pool is exhausted
- */
- public static final String C3P0_ACQUIRE_INCREMENT = "hibernate.c3p0.acquire_increment";
- /**
- * Idle time before a C3P0 pooled connection is validated
- */
- public static final String C3P0_IDLE_TEST_PERIOD = "hibernate.c3p0.idle_test_period";
-
- /**
- * Proxool/Hibernate property prefix
- */
- public static final String PROXOOL_PREFIX = "hibernate.proxool";
- /**
- * Proxool property to configure the Proxool Provider using an XML (<tt>/path/to/file.xml</tt>)
- */
- public static final String PROXOOL_XML = "hibernate.proxool.xml";
- /**
- * Proxool property to configure the Proxool Provider using a properties file (<tt>/path/to/proxool.properties</tt>)
- */
- public static final String PROXOOL_PROPERTIES = "hibernate.proxool.properties";
- /**
- * Proxool property to configure the Proxool Provider from an already existing pool (<tt>true</tt> / <tt>false</tt>)
- */
- public static final String PROXOOL_EXISTING_POOL = "hibernate.proxool.existing_pool";
- /**
- * Proxool property with the Proxool pool alias to use
- * (Required for <tt>PROXOOL_EXISTING_POOL</tt>, <tt>PROXOOL_PROPERTIES</tt>, or
- * <tt>PROXOOL_XML</tt>)
- */
- public static final String PROXOOL_POOL_ALIAS = "hibernate.proxool.pool_alias";
-
- /**
- * Enable automatic session close at end of transaction
- */
- public static final String AUTO_CLOSE_SESSION = "hibernate.transaction.auto_close_session";
- /**
- * Enable automatic flush during the JTA <tt>beforeCompletion()</tt> callback
- */
- public static final String FLUSH_BEFORE_COMPLETION = "hibernate.transaction.flush_before_completion";
- /**
- * Specifies how Hibernate should release JDBC connections.
- */
- public static final String RELEASE_CONNECTIONS = "hibernate.connection.release_mode";
- /**
- * Context scoping impl for {@link org.hibernate.SessionFactory#getCurrentSession()} processing.
- */
- public static final String CURRENT_SESSION_CONTEXT_CLASS = "hibernate.current_session_context_class";
- /**
- * <tt>TransactionFactory</tt> implementor to use for creating <tt>Transaction</tt>s
- */
- public static final String TRANSACTION_STRATEGY = "hibernate.transaction.factory_class";
- /**
- * <tt>TransactionManagerLookup</tt> implementor to use for obtaining the <tt>TransactionManager</tt>
- */
- public static final String TRANSACTION_MANAGER_STRATEGY = "hibernate.transaction.manager_lookup_class";
- /**
- * JNDI name of JTA <tt>UserTransaction</tt> object
- */
- public static final String USER_TRANSACTION = "jta.UserTransaction";
-
- /**
- * The <tt>CacheProvider</tt> implementation class
- */
- public static final String CACHE_PROVIDER = "hibernate.cache.provider_class";
-
- /**
- * The {@link org.hibernate.cache.RegionFactory} implementation class
- */
- public static final String CACHE_REGION_FACTORY = "hibernate.cache.region.factory_class";
-
- /**
- * The <tt>CacheProvider</tt> implementation class
- */
- public static final String CACHE_PROVIDER_CONFIG = "hibernate.cache.provider_configuration_file_resource_path";
- /**
- * The <tt>CacheProvider</tt> JNDI namespace, if pre-bound to JNDI.
- */
- public static final String CACHE_NAMESPACE = "hibernate.cache.jndi";
- /**
- * Enable the query cache (disabled by default)
- */
- public static final String USE_QUERY_CACHE = "hibernate.cache.use_query_cache";
- /**
- * The <tt>QueryCacheFactory</tt> implementation class.
- */
- public static final String QUERY_CACHE_FACTORY = "hibernate.cache.query_cache_factory";
- /**
- * Enable the second-level cache (enabled by default)
- */
- public static final String USE_SECOND_LEVEL_CACHE = "hibernate.cache.use_second_level_cache";
- /**
- * Optimize the cache for mimimal puts instead of minimal gets
- */
- public static final String USE_MINIMAL_PUTS = "hibernate.cache.use_minimal_puts";
- /**
- * The <tt>CacheProvider</tt> region name prefix
- */
- public static final String CACHE_REGION_PREFIX = "hibernate.cache.region_prefix";
- /**
- * Enable use of structured second-level cache entries
- */
- public static final String USE_STRUCTURED_CACHE = "hibernate.cache.use_structured_entries";
-
- /**
- * Enable statistics collection
- */
- public static final String GENERATE_STATISTICS = "hibernate.generate_statistics";
-
- public static final String USE_IDENTIFIER_ROLLBACK = "hibernate.use_identifier_rollback";
-
- /**
- * Use bytecode libraries optimized property access
- */
- public static final String USE_REFLECTION_OPTIMIZER = "hibernate.bytecode.use_reflection_optimizer";
-
- /**
- * The classname of the HQL query parser factory
- */
- public static final String QUERY_TRANSLATOR = "hibernate.query.factory_class";
-
- /**
- * A comma-seperated list of token substitutions to use when translating a Hibernate
- * query to SQL
- */
- public static final String QUERY_SUBSTITUTIONS = "hibernate.query.substitutions";
-
- /**
- * Should named queries be checked during startup (the default is enabled).
- * <p/>
- * Mainly intended for test environments.
- */
- public static final String QUERY_STARTUP_CHECKING = "hibernate.query.startup_check";
-
- /**
- * Auto export/update schema using hbm2ddl tool. Valid values are <tt>update</tt>,
- * <tt>create</tt>, <tt>create-drop</tt> and <tt>validate</tt>.
- */
- public static final String HBM2DDL_AUTO = "hibernate.hbm2ddl.auto";
-
- /**
- * The {@link org.hibernate.exception.SQLExceptionConverter} to use for converting SQLExceptions
- * to Hibernate's JDBCException hierarchy. The default is to use the configured
- * {@link org.hibernate.dialect.Dialect}'s preferred SQLExceptionConverter.
- */
- public static final String SQL_EXCEPTION_CONVERTER = "hibernate.jdbc.sql_exception_converter";
-
- /**
- * Enable wrapping of JDBC result sets in order to speed up column name lookups for
- * broken JDBC drivers
- */
- public static final String WRAP_RESULT_SETS = "hibernate.jdbc.wrap_result_sets";
-
- /**
- * Enable ordering of update statements by primary key value
- */
- public static final String ORDER_UPDATES = "hibernate.order_updates";
-
- /**
- * Enable ordering of insert statements for the purpose of more effecient JDBC batching.
- */
- public static final String ORDER_INSERTS = "hibernate.order_inserts";
-
- /**
- * The EntityMode in which set the Session opened from the SessionFactory.
- */
- public static final String DEFAULT_ENTITY_MODE = "hibernate.default_entity_mode";
-
- /**
- * The jacc context id of the deployment
- */
- public static final String JACC_CONTEXTID = "hibernate.jacc_context_id";
-
- public static final String BYTECODE_PROVIDER = "hibernate.bytecode.provider";
-
- public static final String JPAQL_STRICT_COMPLIANCE= "hibernate.query.jpaql_strict_compliance";
-
- private static final BytecodeProvider BYTECODE_PROVIDER_INSTANCE;
- private static final boolean ENABLE_BINARY_STREAMS;
- private static final boolean ENABLE_REFLECTION_OPTIMIZER;
- private static final boolean JVM_SUPPORTS_LINKED_HASH_COLLECTIONS;
- private static final boolean JVM_HAS_TIMESTAMP_BUG;
- private static final boolean JVM_HAS_JDK14_TIMESTAMP;
- private static final boolean JVM_SUPPORTS_GET_GENERATED_KEYS;
-
- private static final Properties GLOBAL_PROPERTIES;
- private static final HashMap ISOLATION_LEVELS = new HashMap();
- private static final Map OBSOLETE_PROPERTIES = new HashMap();
- private static final Map RENAMED_PROPERTIES = new HashMap();
-
- private static final Logger log = LoggerFactory.getLogger(Environment.class);
-
- /**
- * Issues warnings to the user when any obsolete property names are used.
- */
- public static void verifyProperties(Properties props) {
- Iterator iter = props.keySet().iterator();
- Map propertiesToAdd = new HashMap();
- while ( iter.hasNext() ) {
- final Object propertyName = iter.next();
- Object newPropertyName = OBSOLETE_PROPERTIES.get( propertyName );
- if ( newPropertyName != null ) {
- log.warn( "Usage of obsolete property: " + propertyName + " no longer supported, use: " + newPropertyName );
- }
- newPropertyName = RENAMED_PROPERTIES.get( propertyName );
- if ( newPropertyName != null ) {
- log.warn( "Property [" + propertyName + "] has been renamed to [" + newPropertyName + "]; update your properties appropriately" );
- if ( ! props.containsKey( newPropertyName ) ) {
- propertiesToAdd.put( newPropertyName, props.get( propertyName ) );
- }
- }
- }
- props.putAll(propertiesToAdd);
- }
-
- static {
-
- log.info("Hibernate " + VERSION);
-
- RENAMED_PROPERTIES.put( "hibernate.cglib.use_reflection_optimizer", USE_REFLECTION_OPTIMIZER );
-
- ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_NONE), "NONE" );
- ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_READ_UNCOMMITTED), "READ_UNCOMMITTED" );
- ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_READ_COMMITTED), "READ_COMMITTED" );
- ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_REPEATABLE_READ), "REPEATABLE_READ" );
- ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_SERIALIZABLE), "SERIALIZABLE" );
-
- GLOBAL_PROPERTIES = new Properties();
- //Set USE_REFLECTION_OPTIMIZER to false to fix HHH-227
- GLOBAL_PROPERTIES.setProperty( USE_REFLECTION_OPTIMIZER, Boolean.FALSE.toString() );
-
- try {
- InputStream stream = ConfigHelper.getResourceAsStream("/hibernate.properties");
- try {
- GLOBAL_PROPERTIES.load(stream);
- log.info( "loaded properties from resource hibernate.properties: " + PropertiesHelper.maskOut(GLOBAL_PROPERTIES, PASS) );
- }
- catch (Exception e) {
- log.error("problem loading properties from hibernate.properties");
- }
- finally {
- try{
- stream.close();
- }
- catch (IOException ioe){
- log.error("could not close stream on hibernate.properties", ioe);
- }
- }
- }
- catch (HibernateException he) {
- log.info("hibernate.properties not found");
- }
-
- try {
- GLOBAL_PROPERTIES.putAll( System.getProperties() );
- }
- catch (SecurityException se) {
- log.warn("could not copy system properties, system properties will be ignored");
- }
-
- verifyProperties(GLOBAL_PROPERTIES);
-
- ENABLE_BINARY_STREAMS = PropertiesHelper.getBoolean(USE_STREAMS_FOR_BINARY, GLOBAL_PROPERTIES);
- ENABLE_REFLECTION_OPTIMIZER = PropertiesHelper.getBoolean(USE_REFLECTION_OPTIMIZER, GLOBAL_PROPERTIES);
-
- if (ENABLE_BINARY_STREAMS) {
- log.info("using java.io streams to persist binary types");
- }
- if (ENABLE_REFLECTION_OPTIMIZER) {
- log.info("using bytecode reflection optimizer");
- }
- BYTECODE_PROVIDER_INSTANCE = buildBytecodeProvider( GLOBAL_PROPERTIES );
-
- boolean getGeneratedKeysSupport;
- try {
- Statement.class.getMethod("getGeneratedKeys", null);
- getGeneratedKeysSupport = true;
- }
- catch (NoSuchMethodException nsme) {
- getGeneratedKeysSupport = false;
- }
- JVM_SUPPORTS_GET_GENERATED_KEYS = getGeneratedKeysSupport;
- if (!JVM_SUPPORTS_GET_GENERATED_KEYS) log.info("JVM does not support Statement.getGeneratedKeys()");
-
- boolean linkedHashSupport;
- try {
- Class.forName("java.util.LinkedHashSet");
- linkedHashSupport = true;
- }
- catch (ClassNotFoundException cnfe) {
- linkedHashSupport = false;
- }
- JVM_SUPPORTS_LINKED_HASH_COLLECTIONS = linkedHashSupport;
- if (!JVM_SUPPORTS_LINKED_HASH_COLLECTIONS) log.info("JVM does not support LinkedHasMap, LinkedHashSet - ordered maps and sets disabled");
-
- JVM_HAS_TIMESTAMP_BUG = new Timestamp(123456789).getTime() != 123456789;
- if (JVM_HAS_TIMESTAMP_BUG) log.info("using workaround for JVM bug in java.sql.Timestamp");
- Timestamp t = new Timestamp(0);
- t.setNanos(5 * 1000000);
- JVM_HAS_JDK14_TIMESTAMP = t.getTime() == 5;
- if (JVM_HAS_JDK14_TIMESTAMP) {
- log.info("using JDK 1.4 java.sql.Timestamp handling");
- }
- else {
- log.info("using pre JDK 1.4 java.sql.Timestamp handling");
- }
- }
-
- public static BytecodeProvider getBytecodeProvider() {
- return BYTECODE_PROVIDER_INSTANCE;
- }
-
- /**
- * Does this JVM have the IBM JDK 1.3.1. The bug is <tt>new Timestamp(x).getTime()!=x</tt>.
- */
- public static boolean jvmHasTimestampBug() {
- return JVM_HAS_TIMESTAMP_BUG;
- }
-
- /**
- * Does this JVM handle <tt>Timestamp</tt> in the JDK 1.4 compliant way?
- */
- public static boolean jvmHasJDK14Timestamp() {
- return JVM_HAS_JDK14_TIMESTAMP;
- }
-
- /**
- * Does this JVM support <tt>LinkedHashSet</tt>, <tt>LinkedHashMap</tt>.
- * @see java.util.LinkedHashSet
- * @see java.util.LinkedHashMap
- */
- public static boolean jvmSupportsLinkedHashCollections() {
- return JVM_SUPPORTS_LINKED_HASH_COLLECTIONS;
- }
-
- public static boolean jvmSupportsGetGeneratedKeys() {
- return JVM_SUPPORTS_GET_GENERATED_KEYS;
- }
-
- /**
- * Should we use streams to bind binary types to JDBC IN parameters.
- * Property <tt>hibernate.jdbc.use_streams_for_binary</tt>.
- * @see Environment#USE_STREAMS_FOR_BINARY
- */
- public static boolean useStreamsForBinary() {
- return ENABLE_BINARY_STREAMS;
- }
-
- /**
- * Should we use CGLIB reflection optimizer.
- * Property <tt>hibernate.jdbc.use_refection_optimizer</tt>.
- * @see Environment#USE_REFLECTION_OPTIMIZER
- */
- public static boolean useReflectionOptimizer() {
- return ENABLE_REFLECTION_OPTIMIZER;
- }
-
- private Environment() { throw new UnsupportedOperationException(); }
-
- /**
- * Return <tt>System</tt> properties, extended by any properties specified
- * in <tt>hibernate.properties</tt>.
- * @return Properties
- */
- public static Properties getProperties() {
- Properties copy = new Properties();
- copy.putAll(GLOBAL_PROPERTIES);
- return copy;
- }
-
- /**
- * Get the name of a JDBC transaction isolation level
- *
- * @see java.sql.Connection
- * @param isolation as defined by <tt>java.sql.Connection</tt>
- * @return a human-readable name
- */
- public static String isolationLevelToString(int isolation) {
- return (String) ISOLATION_LEVELS.get( new Integer(isolation) );
- }
-
- public static BytecodeProvider buildBytecodeProvider(Properties properties) {
- String provider = PropertiesHelper.getString( BYTECODE_PROVIDER, properties, "javassist" );
- log.info( "Bytecode provider name : " + provider );
- return buildBytecodeProvider( provider );
- }
-
- private static BytecodeProvider buildBytecodeProvider(String providerName) {
- if ( "javassist".equals( providerName ) ) {
- return new org.hibernate.bytecode.javassist.BytecodeProviderImpl();
- }
- else if ( "cglib".equals( providerName ) ) {
- return new org.hibernate.bytecode.cglib.BytecodeProviderImpl();
- }
-
- log.warn( "unrecognized bytecode provider [" + providerName + "], using javassist by default" );
- return new org.hibernate.bytecode.javassist.BytecodeProviderImpl();
- }
-
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cfg/Environment.java (from rev 15177, core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environment.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cfg/Environment.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/cfg/Environment.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,725 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.cfg;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.sql.Connection;
+import java.sql.Statement;
+import java.sql.Timestamp;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.hibernate.HibernateException;
+import org.hibernate.bytecode.BytecodeProvider;
+import org.hibernate.util.ConfigHelper;
+import org.hibernate.util.PropertiesHelper;
+
+
+/**
+ * Provides access to configuration info passed in <tt>Properties</tt> objects.
+ * <br><br>
+ * Hibernate has two property scopes:
+ * <ul>
+ * <li><b>Factory-level</b> properties may be passed to the <tt>SessionFactory</tt> when it
+ * instantiated. Each instance might have different property values. If no
+ * properties are specified, the factory calls <tt>Environment.getProperties()</tt>.
+ * <li><b>System-level</b> properties are shared by all factory instances and are always
+ * determined by the <tt>Environment</tt> properties.
+ * </ul>
+ * The only system-level properties are
+ * <ul>
+ * <li><tt>hibernate.jdbc.use_streams_for_binary</tt>
+ * <li><tt>hibernate.cglib.use_reflection_optimizer</tt>
+ * </ul>
+ * <tt>Environment</tt> properties are populated by calling <tt>System.getProperties()</tt>
+ * and then from a resource named <tt>/hibernate.properties</tt> if it exists. System
+ * properties override properties specified in <tt>hibernate.properties</tt>.<br>
+ * <br>
+ * The <tt>SessionFactory</tt> is controlled by the following properties.
+ * Properties may be either be <tt>System</tt> properties, properties
+ * defined in a resource named <tt>/hibernate.properties</tt> or an instance of
+ * <tt>java.util.Properties</tt> passed to
+ * <tt>Configuration.buildSessionFactory()</tt><br>
+ * <br>
+ * <table>
+ * <tr><td><b>property</b></td><td><b>meaning</b></td></tr>
+ * <tr>
+ * <td><tt>hibernate.dialect</tt></td>
+ * <td>classname of <tt>org.hibernate.dialect.Dialect</tt> subclass</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.cache.provider_class</tt></td>
+ * <td>classname of <tt>org.hibernate.cache.CacheProvider</tt>
+ * subclass (if not specified EHCache is used)</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.connection.provider_class</tt></td>
+ * <td>classname of <tt>org.hibernate.connection.ConnectionProvider</tt>
+ * subclass (if not specified hueristics are used)</td>
+ * </tr>
+ * <tr><td><tt>hibernate.connection.username</tt></td><td>database username</td></tr>
+ * <tr><td><tt>hibernate.connection.password</tt></td><td>database password</td></tr>
+ * <tr>
+ * <td><tt>hibernate.connection.url</tt></td>
+ * <td>JDBC URL (when using <tt>java.sql.DriverManager</tt>)</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.connection.driver_class</tt></td>
+ * <td>classname of JDBC driver</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.connection.isolation</tt></td>
+ * <td>JDBC transaction isolation level (only when using
+ * <tt>java.sql.DriverManager</tt>)
+ * </td>
+ * </tr>
+ * <td><tt>hibernate.connection.pool_size</tt></td>
+ * <td>the maximum size of the connection pool (only when using
+ * <tt>java.sql.DriverManager</tt>)
+ * </td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.connection.datasource</tt></td>
+ * <td>databasource JNDI name (when using <tt>javax.sql.Datasource</tt>)</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.jndi.url</tt></td><td>JNDI <tt>InitialContext</tt> URL</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.jndi.class</tt></td><td>JNDI <tt>InitialContext</tt> classname</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.max_fetch_depth</tt></td>
+ * <td>maximum depth of outer join fetching</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.jdbc.batch_size</tt></td>
+ * <td>enable use of JDBC2 batch API for drivers which support it</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.jdbc.fetch_size</tt></td>
+ * <td>set the JDBC fetch size</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.jdbc.use_scrollable_resultset</tt></td>
+ * <td>enable use of JDBC2 scrollable resultsets (you only need this specify
+ * this property when using user supplied connections)</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.jdbc.use_getGeneratedKeys</tt></td>
+ * <td>enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve
+ * natively generated keys after insert. Requires JDBC3+ driver and JRE1.4+</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.hbm2ddl.auto</tt></td>
+ * <td>enable auto DDL export</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.default_schema</tt></td>
+ * <td>use given schema name for unqualified tables (always optional)</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.default_catalog</tt></td>
+ * <td>use given catalog name for unqualified tables (always optional)</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.session_factory_name</tt></td>
+ * <td>If set, the factory attempts to bind this name to itself in the
+ * JNDI context. This name is also used to support cross JVM <tt>
+ * Session</tt> (de)serialization.</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.transaction.manager_lookup_class</tt></td>
+ * <td>classname of <tt>org.hibernate.transaction.TransactionManagerLookup</tt>
+ * implementor</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.transaction.factory_class</tt></td>
+ * <td>the factory to use for instantiating <tt>Transaction</tt>s.
+ * (Defaults to <tt>JDBCTransactionFactory</tt>.)</td>
+ * </tr>
+ * <tr>
+ * <td><tt>hibernate.query.substitutions</tt></td><td>query language token substitutions</td>
+ * </tr>
+ * </table>
+ *
+ * @see org.hibernate.SessionFactory
+ * @author Gavin King
+ */
+public final class Environment {
+
+ public static final String VERSION = "3.3.1.GA";
+
+ /**
+ * <tt>ConnectionProvider</tt> implementor to use when obtaining connections
+ */
+ public static final String CONNECTION_PROVIDER ="hibernate.connection.provider_class";
+ /**
+ * JDBC driver class
+ */
+ public static final String DRIVER ="hibernate.connection.driver_class";
+ /**
+ * JDBC transaction isolation level
+ */
+ public static final String ISOLATION ="hibernate.connection.isolation";
+ /**
+ * JDBC URL
+ */
+ public static final String URL ="hibernate.connection.url";
+ /**
+ * JDBC user
+ */
+ public static final String USER ="hibernate.connection.username";
+ /**
+ * JDBC password
+ */
+ public static final String PASS ="hibernate.connection.password";
+ /**
+ * JDBC autocommit mode
+ */
+ public static final String AUTOCOMMIT ="hibernate.connection.autocommit";
+ /**
+ * Maximum number of inactive connections for Hibernate's connection pool
+ */
+ public static final String POOL_SIZE ="hibernate.connection.pool_size";
+ /**
+ * <tt>java.sql.Datasource</tt> JNDI name
+ */
+ public static final String DATASOURCE ="hibernate.connection.datasource";
+ /**
+ * prefix for arbitrary JDBC connection properties
+ */
+ public static final String CONNECTION_PREFIX = "hibernate.connection";
+
+ /**
+ * JNDI initial context class, <tt>Context.INITIAL_CONTEXT_FACTORY</tt>
+ */
+ public static final String JNDI_CLASS ="hibernate.jndi.class";
+ /**
+ * JNDI provider URL, <tt>Context.PROVIDER_URL</tt>
+ */
+ public static final String JNDI_URL ="hibernate.jndi.url";
+ /**
+ * prefix for arbitrary JNDI <tt>InitialContext</tt> properties
+ */
+ public static final String JNDI_PREFIX = "hibernate.jndi";
+ /**
+ * JNDI name to bind to <tt>SessionFactory</tt>
+ */
+ public static final String SESSION_FACTORY_NAME = "hibernate.session_factory_name";
+
+ /**
+ * Hibernate SQL <tt>Dialect</tt> class
+ */
+ public static final String DIALECT ="hibernate.dialect";
+ /**
+ * A default database schema (owner) name to use for unqualified tablenames
+ */
+ public static final String DEFAULT_SCHEMA = "hibernate.default_schema";
+ /**
+ * A default database catalog name to use for unqualified tablenames
+ */
+ public static final String DEFAULT_CATALOG = "hibernate.default_catalog";
+
+ /**
+ * Enable logging of generated SQL to the console
+ */
+ public static final String SHOW_SQL ="hibernate.show_sql";
+ /**
+ * Enable formatting of SQL logged to the console
+ */
+ public static final String FORMAT_SQL ="hibernate.format_sql";
+ /**
+ * Add comments to the generated SQL
+ */
+ public static final String USE_SQL_COMMENTS ="hibernate.use_sql_comments";
+ /**
+ * Maximum depth of outer join fetching
+ */
+ public static final String MAX_FETCH_DEPTH = "hibernate.max_fetch_depth";
+ /**
+ * The default batch size for batch fetching
+ */
+ public static final String DEFAULT_BATCH_FETCH_SIZE = "hibernate.default_batch_fetch_size";
+ /**
+ * Use <tt>java.io</tt> streams to read / write binary data from / to JDBC
+ */
+ public static final String USE_STREAMS_FOR_BINARY = "hibernate.jdbc.use_streams_for_binary";
+ /**
+ * Use JDBC scrollable <tt>ResultSet</tt>s. This property is only necessary when there is
+ * no <tt>ConnectionProvider</tt>, ie. the user is supplying JDBC connections.
+ */
+ public static final String USE_SCROLLABLE_RESULTSET = "hibernate.jdbc.use_scrollable_resultset";
+ /**
+ * Tells the JDBC driver to attempt to retrieve row Id with the JDBC 3.0 PreparedStatement.getGeneratedKeys()
+ * method. In general, performance will be better if this property is set to true and the underlying
+ * JDBC driver supports getGeneratedKeys().
+ */
+ public static final String USE_GET_GENERATED_KEYS = "hibernate.jdbc.use_get_generated_keys";
+ /**
+ * Gives the JDBC driver a hint as to the number of rows that should be fetched from the database
+ * when more rows are needed. If <tt>0</tt>, JDBC driver default settings will be used.
+ */
+ public static final String STATEMENT_FETCH_SIZE = "hibernate.jdbc.fetch_size";
+ /**
+ * Maximum JDBC batch size. A nonzero value enables batch updates.
+ */
+ public static final String STATEMENT_BATCH_SIZE = "hibernate.jdbc.batch_size";
+ /**
+ * Select a custom batcher.
+ */
+ public static final String BATCH_STRATEGY = "hibernate.jdbc.factory_class";
+ /**
+ * Should versioned data be included in batching?
+ */
+ public static final String BATCH_VERSIONED_DATA = "hibernate.jdbc.batch_versioned_data";
+ /**
+ * An XSLT resource used to generate "custom" XML
+ */
+ public static final String OUTPUT_STYLESHEET ="hibernate.xml.output_stylesheet";
+
+ /**
+ * Maximum size of C3P0 connection pool
+ */
+ public static final String C3P0_MAX_SIZE = "hibernate.c3p0.max_size";
+ /**
+ * Minimum size of C3P0 connection pool
+ */
+ public static final String C3P0_MIN_SIZE = "hibernate.c3p0.min_size";
+
+ /**
+ * Maximum idle time for C3P0 connection pool
+ */
+ public static final String C3P0_TIMEOUT = "hibernate.c3p0.timeout";
+ /**
+ * Maximum size of C3P0 statement cache
+ */
+ public static final String C3P0_MAX_STATEMENTS = "hibernate.c3p0.max_statements";
+ /**
+ * Number of connections acquired when pool is exhausted
+ */
+ public static final String C3P0_ACQUIRE_INCREMENT = "hibernate.c3p0.acquire_increment";
+ /**
+ * Idle time before a C3P0 pooled connection is validated
+ */
+ public static final String C3P0_IDLE_TEST_PERIOD = "hibernate.c3p0.idle_test_period";
+
+ /**
+ * Proxool/Hibernate property prefix
+ */
+ public static final String PROXOOL_PREFIX = "hibernate.proxool";
+ /**
+ * Proxool property to configure the Proxool Provider using an XML (<tt>/path/to/file.xml</tt>)
+ */
+ public static final String PROXOOL_XML = "hibernate.proxool.xml";
+ /**
+ * Proxool property to configure the Proxool Provider using a properties file (<tt>/path/to/proxool.properties</tt>)
+ */
+ public static final String PROXOOL_PROPERTIES = "hibernate.proxool.properties";
+ /**
+ * Proxool property to configure the Proxool Provider from an already existing pool (<tt>true</tt> / <tt>false</tt>)
+ */
+ public static final String PROXOOL_EXISTING_POOL = "hibernate.proxool.existing_pool";
+ /**
+ * Proxool property with the Proxool pool alias to use
+ * (Required for <tt>PROXOOL_EXISTING_POOL</tt>, <tt>PROXOOL_PROPERTIES</tt>, or
+ * <tt>PROXOOL_XML</tt>)
+ */
+ public static final String PROXOOL_POOL_ALIAS = "hibernate.proxool.pool_alias";
+
+ /**
+ * Enable automatic session close at end of transaction
+ */
+ public static final String AUTO_CLOSE_SESSION = "hibernate.transaction.auto_close_session";
+ /**
+ * Enable automatic flush during the JTA <tt>beforeCompletion()</tt> callback
+ */
+ public static final String FLUSH_BEFORE_COMPLETION = "hibernate.transaction.flush_before_completion";
+ /**
+ * Specifies how Hibernate should release JDBC connections.
+ */
+ public static final String RELEASE_CONNECTIONS = "hibernate.connection.release_mode";
+ /**
+ * Context scoping impl for {@link org.hibernate.SessionFactory#getCurrentSession()} processing.
+ */
+ public static final String CURRENT_SESSION_CONTEXT_CLASS = "hibernate.current_session_context_class";
+ /**
+ * <tt>TransactionFactory</tt> implementor to use for creating <tt>Transaction</tt>s
+ */
+ public static final String TRANSACTION_STRATEGY = "hibernate.transaction.factory_class";
+ /**
+ * <tt>TransactionManagerLookup</tt> implementor to use for obtaining the <tt>TransactionManager</tt>
+ */
+ public static final String TRANSACTION_MANAGER_STRATEGY = "hibernate.transaction.manager_lookup_class";
+ /**
+ * JNDI name of JTA <tt>UserTransaction</tt> object
+ */
+ public static final String USER_TRANSACTION = "jta.UserTransaction";
+
+ /**
+ * The <tt>CacheProvider</tt> implementation class
+ */
+ public static final String CACHE_PROVIDER = "hibernate.cache.provider_class";
+
+ /**
+ * The {@link org.hibernate.cache.RegionFactory} implementation class
+ */
+ public static final String CACHE_REGION_FACTORY = "hibernate.cache.region.factory_class";
+
+ /**
+ * The <tt>CacheProvider</tt> implementation class
+ */
+ public static final String CACHE_PROVIDER_CONFIG = "hibernate.cache.provider_configuration_file_resource_path";
+ /**
+ * The <tt>CacheProvider</tt> JNDI namespace, if pre-bound to JNDI.
+ */
+ public static final String CACHE_NAMESPACE = "hibernate.cache.jndi";
+ /**
+ * Enable the query cache (disabled by default)
+ */
+ public static final String USE_QUERY_CACHE = "hibernate.cache.use_query_cache";
+ /**
+ * The <tt>QueryCacheFactory</tt> implementation class.
+ */
+ public static final String QUERY_CACHE_FACTORY = "hibernate.cache.query_cache_factory";
+ /**
+ * Enable the second-level cache (enabled by default)
+ */
+ public static final String USE_SECOND_LEVEL_CACHE = "hibernate.cache.use_second_level_cache";
+ /**
+ * Optimize the cache for mimimal puts instead of minimal gets
+ */
+ public static final String USE_MINIMAL_PUTS = "hibernate.cache.use_minimal_puts";
+ /**
+ * The <tt>CacheProvider</tt> region name prefix
+ */
+ public static final String CACHE_REGION_PREFIX = "hibernate.cache.region_prefix";
+ /**
+ * Enable use of structured second-level cache entries
+ */
+ public static final String USE_STRUCTURED_CACHE = "hibernate.cache.use_structured_entries";
+
+ /**
+ * Enable statistics collection
+ */
+ public static final String GENERATE_STATISTICS = "hibernate.generate_statistics";
+
+ public static final String USE_IDENTIFIER_ROLLBACK = "hibernate.use_identifier_rollback";
+
+ /**
+ * Use bytecode libraries optimized property access
+ */
+ public static final String USE_REFLECTION_OPTIMIZER = "hibernate.bytecode.use_reflection_optimizer";
+
+ /**
+ * The classname of the HQL query parser factory
+ */
+ public static final String QUERY_TRANSLATOR = "hibernate.query.factory_class";
+
+ /**
+ * A comma-seperated list of token substitutions to use when translating a Hibernate
+ * query to SQL
+ */
+ public static final String QUERY_SUBSTITUTIONS = "hibernate.query.substitutions";
+
+ /**
+ * Should named queries be checked during startup (the default is enabled).
+ * <p/>
+ * Mainly intended for test environments.
+ */
+ public static final String QUERY_STARTUP_CHECKING = "hibernate.query.startup_check";
+
+ /**
+ * Auto export/update schema using hbm2ddl tool. Valid values are <tt>update</tt>,
+ * <tt>create</tt>, <tt>create-drop</tt> and <tt>validate</tt>.
+ */
+ public static final String HBM2DDL_AUTO = "hibernate.hbm2ddl.auto";
+
+ /**
+ * The {@link org.hibernate.exception.SQLExceptionConverter} to use for converting SQLExceptions
+ * to Hibernate's JDBCException hierarchy. The default is to use the configured
+ * {@link org.hibernate.dialect.Dialect}'s preferred SQLExceptionConverter.
+ */
+ public static final String SQL_EXCEPTION_CONVERTER = "hibernate.jdbc.sql_exception_converter";
+
+ /**
+ * Enable wrapping of JDBC result sets in order to speed up column name lookups for
+ * broken JDBC drivers
+ */
+ public static final String WRAP_RESULT_SETS = "hibernate.jdbc.wrap_result_sets";
+
+ /**
+ * Enable ordering of update statements by primary key value
+ */
+ public static final String ORDER_UPDATES = "hibernate.order_updates";
+
+ /**
+ * Enable ordering of insert statements for the purpose of more effecient JDBC batching.
+ */
+ public static final String ORDER_INSERTS = "hibernate.order_inserts";
+
+ /**
+ * The EntityMode in which set the Session opened from the SessionFactory.
+ */
+ public static final String DEFAULT_ENTITY_MODE = "hibernate.default_entity_mode";
+
+ /**
+ * The jacc context id of the deployment
+ */
+ public static final String JACC_CONTEXTID = "hibernate.jacc_context_id";
+
+ public static final String BYTECODE_PROVIDER = "hibernate.bytecode.provider";
+
+ public static final String JPAQL_STRICT_COMPLIANCE= "hibernate.query.jpaql_strict_compliance";
+
+ private static final BytecodeProvider BYTECODE_PROVIDER_INSTANCE;
+ private static final boolean ENABLE_BINARY_STREAMS;
+ private static final boolean ENABLE_REFLECTION_OPTIMIZER;
+ private static final boolean JVM_SUPPORTS_LINKED_HASH_COLLECTIONS;
+ private static final boolean JVM_HAS_TIMESTAMP_BUG;
+ private static final boolean JVM_HAS_JDK14_TIMESTAMP;
+ private static final boolean JVM_SUPPORTS_GET_GENERATED_KEYS;
+
+ private static final Properties GLOBAL_PROPERTIES;
+ private static final HashMap ISOLATION_LEVELS = new HashMap();
+ private static final Map OBSOLETE_PROPERTIES = new HashMap();
+ private static final Map RENAMED_PROPERTIES = new HashMap();
+
+ private static final Logger log = LoggerFactory.getLogger(Environment.class);
+
+ /**
+ * Issues warnings to the user when any obsolete property names are used.
+ */
+ public static void verifyProperties(Properties props) {
+ Iterator iter = props.keySet().iterator();
+ Map propertiesToAdd = new HashMap();
+ while ( iter.hasNext() ) {
+ final Object propertyName = iter.next();
+ Object newPropertyName = OBSOLETE_PROPERTIES.get( propertyName );
+ if ( newPropertyName != null ) {
+ log.warn( "Usage of obsolete property: " + propertyName + " no longer supported, use: " + newPropertyName );
+ }
+ newPropertyName = RENAMED_PROPERTIES.get( propertyName );
+ if ( newPropertyName != null ) {
+ log.warn( "Property [" + propertyName + "] has been renamed to [" + newPropertyName + "]; update your properties appropriately" );
+ if ( ! props.containsKey( newPropertyName ) ) {
+ propertiesToAdd.put( newPropertyName, props.get( propertyName ) );
+ }
+ }
+ }
+ props.putAll(propertiesToAdd);
+ }
+
+ static {
+
+ log.info("Hibernate " + VERSION);
+
+ RENAMED_PROPERTIES.put( "hibernate.cglib.use_reflection_optimizer", USE_REFLECTION_OPTIMIZER );
+
+ ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_NONE), "NONE" );
+ ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_READ_UNCOMMITTED), "READ_UNCOMMITTED" );
+ ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_READ_COMMITTED), "READ_COMMITTED" );
+ ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_REPEATABLE_READ), "REPEATABLE_READ" );
+ ISOLATION_LEVELS.put( new Integer(Connection.TRANSACTION_SERIALIZABLE), "SERIALIZABLE" );
+
+ GLOBAL_PROPERTIES = new Properties();
+ //Set USE_REFLECTION_OPTIMIZER to false to fix HHH-227
+ GLOBAL_PROPERTIES.setProperty( USE_REFLECTION_OPTIMIZER, Boolean.FALSE.toString() );
+
+ try {
+ InputStream stream = ConfigHelper.getResourceAsStream("/hibernate.properties");
+ try {
+ GLOBAL_PROPERTIES.load(stream);
+ log.info( "loaded properties from resource hibernate.properties: " + PropertiesHelper.maskOut(GLOBAL_PROPERTIES, PASS) );
+ }
+ catch (Exception e) {
+ log.error("problem loading properties from hibernate.properties");
+ }
+ finally {
+ try{
+ stream.close();
+ }
+ catch (IOException ioe){
+ log.error("could not close stream on hibernate.properties", ioe);
+ }
+ }
+ }
+ catch (HibernateException he) {
+ log.info("hibernate.properties not found");
+ }
+
+ try {
+ GLOBAL_PROPERTIES.putAll( System.getProperties() );
+ }
+ catch (SecurityException se) {
+ log.warn("could not copy system properties, system properties will be ignored");
+ }
+
+ verifyProperties(GLOBAL_PROPERTIES);
+
+ ENABLE_BINARY_STREAMS = PropertiesHelper.getBoolean(USE_STREAMS_FOR_BINARY, GLOBAL_PROPERTIES);
+ ENABLE_REFLECTION_OPTIMIZER = PropertiesHelper.getBoolean(USE_REFLECTION_OPTIMIZER, GLOBAL_PROPERTIES);
+
+ if (ENABLE_BINARY_STREAMS) {
+ log.info("using java.io streams to persist binary types");
+ }
+ if (ENABLE_REFLECTION_OPTIMIZER) {
+ log.info("using bytecode reflection optimizer");
+ }
+ BYTECODE_PROVIDER_INSTANCE = buildBytecodeProvider( GLOBAL_PROPERTIES );
+
+ boolean getGeneratedKeysSupport;
+ try {
+ Statement.class.getMethod("getGeneratedKeys", null);
+ getGeneratedKeysSupport = true;
+ }
+ catch (NoSuchMethodException nsme) {
+ getGeneratedKeysSupport = false;
+ }
+ JVM_SUPPORTS_GET_GENERATED_KEYS = getGeneratedKeysSupport;
+ if (!JVM_SUPPORTS_GET_GENERATED_KEYS) log.info("JVM does not support Statement.getGeneratedKeys()");
+
+ boolean linkedHashSupport;
+ try {
+ Class.forName("java.util.LinkedHashSet");
+ linkedHashSupport = true;
+ }
+ catch (ClassNotFoundException cnfe) {
+ linkedHashSupport = false;
+ }
+ JVM_SUPPORTS_LINKED_HASH_COLLECTIONS = linkedHashSupport;
+ if (!JVM_SUPPORTS_LINKED_HASH_COLLECTIONS) log.info("JVM does not support LinkedHasMap, LinkedHashSet - ordered maps and sets disabled");
+
+ JVM_HAS_TIMESTAMP_BUG = new Timestamp(123456789).getTime() != 123456789;
+ if (JVM_HAS_TIMESTAMP_BUG) log.info("using workaround for JVM bug in java.sql.Timestamp");
+ Timestamp t = new Timestamp(0);
+ t.setNanos(5 * 1000000);
+ JVM_HAS_JDK14_TIMESTAMP = t.getTime() == 5;
+ if (JVM_HAS_JDK14_TIMESTAMP) {
+ log.info("using JDK 1.4 java.sql.Timestamp handling");
+ }
+ else {
+ log.info("using pre JDK 1.4 java.sql.Timestamp handling");
+ }
+ }
+
+ public static BytecodeProvider getBytecodeProvider() {
+ return BYTECODE_PROVIDER_INSTANCE;
+ }
+
+ /**
+ * Does this JVM have the IBM JDK 1.3.1. The bug is <tt>new Timestamp(x).getTime()!=x</tt>.
+ */
+ public static boolean jvmHasTimestampBug() {
+ return JVM_HAS_TIMESTAMP_BUG;
+ }
+
+ /**
+ * Does this JVM handle <tt>Timestamp</tt> in the JDK 1.4 compliant way?
+ */
+ public static boolean jvmHasJDK14Timestamp() {
+ return JVM_HAS_JDK14_TIMESTAMP;
+ }
+
+ /**
+ * Does this JVM support <tt>LinkedHashSet</tt>, <tt>LinkedHashMap</tt>.
+ * @see java.util.LinkedHashSet
+ * @see java.util.LinkedHashMap
+ */
+ public static boolean jvmSupportsLinkedHashCollections() {
+ return JVM_SUPPORTS_LINKED_HASH_COLLECTIONS;
+ }
+
+ public static boolean jvmSupportsGetGeneratedKeys() {
+ return JVM_SUPPORTS_GET_GENERATED_KEYS;
+ }
+
+ /**
+ * Should we use streams to bind binary types to JDBC IN parameters.
+ * Property <tt>hibernate.jdbc.use_streams_for_binary</tt>.
+ * @see Environment#USE_STREAMS_FOR_BINARY
+ */
+ public static boolean useStreamsForBinary() {
+ return ENABLE_BINARY_STREAMS;
+ }
+
+ /**
+ * Should we use CGLIB reflection optimizer.
+ * Property <tt>hibernate.jdbc.use_refection_optimizer</tt>.
+ * @see Environment#USE_REFLECTION_OPTIMIZER
+ */
+ public static boolean useReflectionOptimizer() {
+ return ENABLE_REFLECTION_OPTIMIZER;
+ }
+
+ private Environment() { throw new UnsupportedOperationException(); }
+
+ /**
+ * Return <tt>System</tt> properties, extended by any properties specified
+ * in <tt>hibernate.properties</tt>.
+ * @return Properties
+ */
+ public static Properties getProperties() {
+ Properties copy = new Properties();
+ copy.putAll(GLOBAL_PROPERTIES);
+ return copy;
+ }
+
+ /**
+ * Get the name of a JDBC transaction isolation level
+ *
+ * @see java.sql.Connection
+ * @param isolation as defined by <tt>java.sql.Connection</tt>
+ * @return a human-readable name
+ */
+ public static String isolationLevelToString(int isolation) {
+ return (String) ISOLATION_LEVELS.get( new Integer(isolation) );
+ }
+
+ public static BytecodeProvider buildBytecodeProvider(Properties properties) {
+ String provider = PropertiesHelper.getString( BYTECODE_PROVIDER, properties, "javassist" );
+ log.info( "Bytecode provider name : " + provider );
+ return buildBytecodeProvider( provider );
+ }
+
+ private static BytecodeProvider buildBytecodeProvider(String providerName) {
+ if ( "javassist".equals( providerName ) ) {
+ return new org.hibernate.bytecode.javassist.BytecodeProviderImpl();
+ }
+ else if ( "cglib".equals( providerName ) ) {
+ return new org.hibernate.bytecode.cglib.BytecodeProviderImpl();
+ }
+
+ log.warn( "unrecognized bytecode provider [" + providerName + "], using javassist by default" );
+ return new org.hibernate.bytecode.javassist.BytecodeProviderImpl();
+ }
+
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/context/JTASessionContext.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/context/JTASessionContext.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/context/JTASessionContext.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,204 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.context;
-
-import org.hibernate.HibernateException;
-import org.hibernate.ConnectionReleaseMode;
-import org.hibernate.classic.Session;
-import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.util.JTAHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.Synchronization;
-import java.util.Map;
-import java.util.Hashtable;
-
-/**
- * An implementation of {@link CurrentSessionContext} which scopes the notion
- * of a current session to a JTA transaction. Because JTA gives us a nice
- * tie-in to clean up after ourselves, this implementation will generate
- * Sessions as needed provided a JTA transaction is in effect. If a session
- * is not already associated with the current JTA transaction at the time
- * {@link #currentSession()} is called, a new session will be opened and it
- * will be associated with that JTA transaction.
- * <p/>
- * Note that the sessions returned from this method are automatically configured with
- * both the {@link org.hibernate.cfg.Environment#FLUSH_BEFORE_COMPLETION auto-flush} and
- * {@link org.hibernate.cfg.Environment#AUTO_CLOSE_SESSION auto-close} attributes set to
- * true, meaning that the Session will be automatically flushed and closed
- * as part of the lifecycle for the JTA transaction to which it is associated.
- * Additionally, it will also be configured to aggressively release JDBC
- * connections after each statement is executed. These settings are governed
- * by the {@link #isAutoFlushEnabled()}, {@link #isAutoCloseEnabled()}, and
- * {@link #getConnectionReleaseMode()} methods; these are provided (along with
- * the {@link #buildOrObtainSession()} method) for easier subclassing for custom
- * JTA-based session tracking logic (like maybe long-session semantics).
- *
- * @author Steve Ebersole
- */
-public class JTASessionContext implements CurrentSessionContext {
-
- private static final Logger log = LoggerFactory.getLogger( JTASessionContext.class );
-
- protected final SessionFactoryImplementor factory;
- private transient Map currentSessionMap = new Hashtable();
-
- public JTASessionContext(SessionFactoryImplementor factory) {
- this.factory = factory;
- }
-
- /**
- * {@inheritDoc}
- */
- public Session currentSession() throws HibernateException {
- TransactionManager transactionManager = factory.getTransactionManager();
- if ( transactionManager == null ) {
- throw new HibernateException( "No TransactionManagerLookup specified" );
- }
-
- Transaction txn;
- try {
- txn = transactionManager.getTransaction();
- if ( txn == null ) {
- throw new HibernateException( "Unable to locate current JTA transaction" );
- }
- if ( !JTAHelper.isInProgress( txn.getStatus() ) ) {
- // We could register the session against the transaction even though it is
- // not started, but we'd have no guarentee of ever getting the map
- // entries cleaned up (aside from spawning threads).
- throw new HibernateException( "Current transaction is not in progress" );
- }
- }
- catch ( HibernateException e ) {
- throw e;
- }
- catch ( Throwable t ) {
- throw new HibernateException( "Problem locating/validating JTA transaction", t );
- }
-
- Session currentSession = ( Session ) currentSessionMap.get( txn );
-
- if ( currentSession == null ) {
- currentSession = buildOrObtainSession();
-
- try {
- txn.registerSynchronization( buildCleanupSynch( txn ) );
- }
- catch ( Throwable t ) {
- try {
- currentSession.close();
- }
- catch ( Throwable ignore ) {
- log.debug( "Unable to release generated current-session on failed synch registration", ignore );
- }
- throw new HibernateException( "Unable to register cleanup Synchronization with TransactionManager" );
- }
-
- Object txnIdentifier = factory.getSettings().getTransactionManagerLookup() == null
- ? txn
- : factory.getSettings().getTransactionManagerLookup().getTransactionIdentifier( txn );
- currentSessionMap.put( txnIdentifier, currentSession );
- }
-
- return currentSession;
- }
-
- private CleanupSynch buildCleanupSynch(Transaction txn) {
- return new CleanupSynch( txn, this );
- }
-
- /**
- * Strictly provided for subclassing purposes; specifically to allow long-session
- * support.
- * <p/>
- * This implementation always just opens a new session.
- *
- * @return the built or (re)obtained session.
- */
- protected Session buildOrObtainSession() {
- return factory.openSession(
- null,
- isAutoFlushEnabled(),
- isAutoCloseEnabled(),
- getConnectionReleaseMode()
- );
- }
-
- /**
- * Mainly for subclass usage. This impl always returns true.
- *
- * @return Whether or not the the session should be closed by transaction completion.
- */
- protected boolean isAutoCloseEnabled() {
- return true;
- }
-
- /**
- * Mainly for subclass usage. This impl always returns true.
- *
- * @return Whether or not the the session should be flushed prior transaction completion.
- */
- protected boolean isAutoFlushEnabled() {
- return true;
- }
-
- /**
- * Mainly for subclass usage. This impl always returns after_statement.
- *
- * @return The connection release mode for any built sessions.
- */
- protected ConnectionReleaseMode getConnectionReleaseMode() {
- return ConnectionReleaseMode.AFTER_STATEMENT;
- }
-
- /**
- * JTA transaction synch used for cleanup of the internal session map.
- */
- protected static class CleanupSynch implements Synchronization {
- private Transaction txn;
- private JTASessionContext context;
-
- public CleanupSynch(Transaction txn, JTASessionContext context) {
- this.txn = txn;
- this.context = context;
- }
-
- /**
- * {@inheritDoc}
- */
- public void beforeCompletion() {
- }
-
- /**
- * {@inheritDoc}
- */
- public void afterCompletion(int i) {
- context.currentSessionMap.remove( txn );
- }
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/context/JTASessionContext.java (from rev 15167, core/branches/Branch_3_3/core/src/main/java/org/hibernate/context/JTASessionContext.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/context/JTASessionContext.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/context/JTASessionContext.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,212 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.context;
+
+import org.hibernate.HibernateException;
+import org.hibernate.ConnectionReleaseMode;
+import org.hibernate.classic.Session;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.util.JTAHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import javax.transaction.Synchronization;
+import java.util.Map;
+import java.util.Hashtable;
+
+/**
+ * An implementation of {@link CurrentSessionContext} which scopes the notion
+ * of a current session to a JTA transaction. Because JTA gives us a nice
+ * tie-in to clean up after ourselves, this implementation will generate
+ * Sessions as needed provided a JTA transaction is in effect. If a session
+ * is not already associated with the current JTA transaction at the time
+ * {@link #currentSession()} is called, a new session will be opened and it
+ * will be associated with that JTA transaction.
+ * <p/>
+ * Note that the sessions returned from this method are automatically configured with
+ * both the {@link org.hibernate.cfg.Environment#FLUSH_BEFORE_COMPLETION auto-flush} and
+ * {@link org.hibernate.cfg.Environment#AUTO_CLOSE_SESSION auto-close} attributes set to
+ * true, meaning that the Session will be automatically flushed and closed
+ * as part of the lifecycle for the JTA transaction to which it is associated.
+ * Additionally, it will also be configured to aggressively release JDBC
+ * connections after each statement is executed. These settings are governed
+ * by the {@link #isAutoFlushEnabled()}, {@link #isAutoCloseEnabled()}, and
+ * {@link #getConnectionReleaseMode()} methods; these are provided (along with
+ * the {@link #buildOrObtainSession()} method) for easier subclassing for custom
+ * JTA-based session tracking logic (like maybe long-session semantics).
+ *
+ * @author Steve Ebersole
+ */
+public class JTASessionContext implements CurrentSessionContext {
+
+ private static final Logger log = LoggerFactory.getLogger( JTASessionContext.class );
+
+ protected final SessionFactoryImplementor factory;
+ private transient Map currentSessionMap = new Hashtable();
+
+ public JTASessionContext(SessionFactoryImplementor factory) {
+ this.factory = factory;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Session currentSession() throws HibernateException {
+ TransactionManager transactionManager = factory.getTransactionManager();
+ if ( transactionManager == null ) {
+ throw new HibernateException( "No TransactionManagerLookup specified" );
+ }
+
+ Transaction txn;
+ try {
+ txn = transactionManager.getTransaction();
+ if ( txn == null ) {
+ throw new HibernateException( "Unable to locate current JTA transaction" );
+ }
+ if ( !JTAHelper.isInProgress( txn.getStatus() ) ) {
+ // We could register the session against the transaction even though it is
+ // not started, but we'd have no guarentee of ever getting the map
+ // entries cleaned up (aside from spawning threads).
+ throw new HibernateException( "Current transaction is not in progress" );
+ }
+ }
+ catch ( HibernateException e ) {
+ throw e;
+ }
+ catch ( Throwable t ) {
+ throw new HibernateException( "Problem locating/validating JTA transaction", t );
+ }
+
+ final Object txnIdentifier = factory.getSettings().getTransactionManagerLookup() == null
+ ? txn
+ : factory.getSettings().getTransactionManagerLookup().getTransactionIdentifier( txn );
+
+ Session currentSession = ( Session ) currentSessionMap.get( txnIdentifier );
+
+ if ( currentSession == null ) {
+ currentSession = buildOrObtainSession();
+
+ try {
+ txn.registerSynchronization( buildCleanupSynch( txnIdentifier ) );
+ }
+ catch ( Throwable t ) {
+ try {
+ currentSession.close();
+ }
+ catch ( Throwable ignore ) {
+ log.debug( "Unable to release generated current-session on failed synch registration", ignore );
+ }
+ throw new HibernateException( "Unable to register cleanup Synchronization with TransactionManager" );
+ }
+
+ currentSessionMap.put( txnIdentifier, currentSession );
+ }
+
+ return currentSession;
+ }
+
+ /**
+ * Builds a {@link CleanupSynch} capable of cleaning up the the current session map as an after transaction
+ * callback.
+ *
+ * @param transactionIdentifier The transaction identifier under which the current session is registered.
+ * @return The cleanup synch.
+ */
+ private CleanupSynch buildCleanupSynch(Object transactionIdentifier) {
+ return new CleanupSynch( transactionIdentifier, this );
+ }
+
+ /**
+ * Strictly provided for subclassing purposes; specifically to allow long-session
+ * support.
+ * <p/>
+ * This implementation always just opens a new session.
+ *
+ * @return the built or (re)obtained session.
+ */
+ protected Session buildOrObtainSession() {
+ return factory.openSession(
+ null,
+ isAutoFlushEnabled(),
+ isAutoCloseEnabled(),
+ getConnectionReleaseMode()
+ );
+ }
+
+ /**
+ * Mainly for subclass usage. This impl always returns true.
+ *
+ * @return Whether or not the the session should be closed by transaction completion.
+ */
+ protected boolean isAutoCloseEnabled() {
+ return true;
+ }
+
+ /**
+ * Mainly for subclass usage. This impl always returns true.
+ *
+ * @return Whether or not the the session should be flushed prior transaction completion.
+ */
+ protected boolean isAutoFlushEnabled() {
+ return true;
+ }
+
+ /**
+ * Mainly for subclass usage. This impl always returns after_statement.
+ *
+ * @return The connection release mode for any built sessions.
+ */
+ protected ConnectionReleaseMode getConnectionReleaseMode() {
+ return ConnectionReleaseMode.AFTER_STATEMENT;
+ }
+
+ /**
+ * JTA transaction synch used for cleanup of the internal session map.
+ */
+ protected static class CleanupSynch implements Synchronization {
+ private Object transactionIdentifier;
+ private JTASessionContext context;
+
+ public CleanupSynch(Object transactionIdentifier, JTASessionContext context) {
+ this.transactionIdentifier = transactionIdentifier;
+ this.context = context;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void beforeCompletion() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void afterCompletion(int i) {
+ context.currentSessionMap.remove( transactionIdentifier );
+ }
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,78 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.criterion;
-
-import org.hibernate.transform.AliasToEntityMapResultTransformer;
-import org.hibernate.transform.DistinctRootEntityResultTransformer;
-import org.hibernate.transform.PassThroughResultTransformer;
-import org.hibernate.transform.ResultTransformer;
-import org.hibernate.transform.RootEntityResultTransformer;
-
-/**
- * @author Gavin King
- */
-public interface CriteriaSpecification {
-
- /**
- * The alias that refers to the "root" entity of the criteria query.
- */
- public static final String ROOT_ALIAS = "this";
-
- /**
- * Each row of results is a <tt>Map</tt> from alias to entity instance
- */
- public static final ResultTransformer ALIAS_TO_ENTITY_MAP = new AliasToEntityMapResultTransformer();
-
- /**
- * Each row of results is an instance of the root entity
- */
- public static final ResultTransformer ROOT_ENTITY = new RootEntityResultTransformer();
-
- /**
- * Each row of results is a distinct instance of the root entity
- */
- public static final ResultTransformer DISTINCT_ROOT_ENTITY = new DistinctRootEntityResultTransformer();
-
- /**
- * This result transformer is selected implicitly by calling <tt>setProjection()</tt>
- */
- public static final ResultTransformer PROJECTION = new PassThroughResultTransformer();
-
- /**
- * Specifies joining to an entity based on an inner join.
- */
- public static final int INNER_JOIN = org.hibernate.sql.JoinFragment.INNER_JOIN;
-
- /**
- * Specifies joining to an entity based on a full join.
- */
- public static final int FULL_JOIN = org.hibernate.sql.JoinFragment.FULL_JOIN;
-
- /**
- * Specifies joining to an entity based on a left outer join.
- */
- public static final int LEFT_JOIN = org.hibernate.sql.JoinFragment.LEFT_OUTER_JOIN;
-
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java (from rev 15175, core/branches/Branch_3_3/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/criterion/CriteriaSpecification.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,78 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.criterion;
+
+import org.hibernate.transform.AliasToEntityMapResultTransformer;
+import org.hibernate.transform.DistinctRootEntityResultTransformer;
+import org.hibernate.transform.PassThroughResultTransformer;
+import org.hibernate.transform.ResultTransformer;
+import org.hibernate.transform.RootEntityResultTransformer;
+
+/**
+ * @author Gavin King
+ */
+public interface CriteriaSpecification {
+
+ /**
+ * The alias that refers to the "root" entity of the criteria query.
+ */
+ public static final String ROOT_ALIAS = "this";
+
+ /**
+ * Each row of results is a <tt>Map</tt> from alias to entity instance
+ */
+ public static final ResultTransformer ALIAS_TO_ENTITY_MAP = AliasToEntityMapResultTransformer.INSTANCE;
+
+ /**
+ * Each row of results is an instance of the root entity
+ */
+ public static final ResultTransformer ROOT_ENTITY = RootEntityResultTransformer.INSTANCE;
+
+ /**
+ * Each row of results is a distinct instance of the root entity
+ */
+ public static final ResultTransformer DISTINCT_ROOT_ENTITY = DistinctRootEntityResultTransformer.INSTANCE;
+
+ /**
+ * This result transformer is selected implicitly by calling <tt>setProjection()</tt>
+ */
+ public static final ResultTransformer PROJECTION = PassThroughResultTransformer.INSTANCE;
+
+ /**
+ * Specifies joining to an entity based on an inner join.
+ */
+ public static final int INNER_JOIN = org.hibernate.sql.JoinFragment.INNER_JOIN;
+
+ /**
+ * Specifies joining to an entity based on a full join.
+ */
+ public static final int FULL_JOIN = org.hibernate.sql.JoinFragment.FULL_JOIN;
+
+ /**
+ * Specifies joining to an entity based on a left outer join.
+ */
+ public static final int LEFT_JOIN = org.hibernate.sql.JoinFragment.LEFT_OUTER_JOIN;
+
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/DerbyDialect.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/DerbyDialect.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/DerbyDialect.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,221 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.dialect;
-
-import org.hibernate.Hibernate;
-import org.hibernate.QueryException;
-import org.hibernate.HibernateException;
-import org.hibernate.engine.Mapping;
-import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.type.Type;
-import org.hibernate.dialect.function.VarArgsSQLFunction;
-import org.hibernate.dialect.function.SQLFunction;
-import org.hibernate.dialect.function.SQLFunctionTemplate;
-import org.hibernate.id.TableHiLoGenerator;
-import org.hibernate.sql.CaseFragment;
-import org.hibernate.sql.DerbyCaseFragment;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author Simon Johnston
- *
- * Hibernate Dialect for Cloudscape 10 - aka Derby. This implements both an
- * override for the identity column generator as well as for the case statement
- * issue documented at:
- * http://www.jroller.com/comments/kenlars99/Weblog/cloudscape_soon_to_be_derby
- */
-public class DerbyDialect extends DB2Dialect {
-
- public DerbyDialect() {
- super();
- registerFunction( "concat", new VarArgsSQLFunction( Hibernate.STRING, "(","||",")" ) );
- registerFunction( "trim", new DerbyTrimFunctionEmulation() );
- }
-
- /**
- * This is different in Cloudscape to DB2.
- */
- public String getIdentityColumnString() {
- return "not null generated always as identity"; //$NON-NLS-1
- }
-
- /**
- * Return the case statement modified for Cloudscape.
- */
- public CaseFragment createCaseFragment() {
- return new DerbyCaseFragment();
- }
-
- public boolean dropConstraints() {
- return true;
- }
-
- public Class getNativeIdentifierGeneratorClass() {
- return TableHiLoGenerator.class;
- }
-
- public boolean supportsSequences() {
- return false;
- }
-
- public boolean supportsLimit() {
- return false;
- }
-
- public boolean supportsLimitOffset() {
- return false;
- }
-
- public String getQuerySequencesString() {
- return null ;
- }
-
- /**
- * A specialized function template to emulate the ANSI trim function on Derby DB
- * since it does not support the full trim specification. However, we cannot even
- * fully emulate it because there is not standard 'replace' function either. :(
- */
- public static class DerbyTrimFunctionEmulation implements SQLFunction {
- private static final SQLFunction LEADING_SPACE_TRIM = new SQLFunctionTemplate( Hibernate.STRING, "ltrim( ?1 )");
- private static final SQLFunction TRAILING_SPACE_TRIM = new SQLFunctionTemplate( Hibernate.STRING, "rtrim( ?1 )");
- private static final SQLFunction BOTH_SPACE_TRIM = new SQLFunctionTemplate( Hibernate.STRING, "ltrim( rtrim( ?1 ) )");
- private static final SQLFunction BOTH_SPACE_TRIM_FROM = new SQLFunctionTemplate( Hibernate.STRING, "ltrim( rtrim( ?2 ) )");
-
- public Type getReturnType(Type columnType, Mapping mapping) throws QueryException {
- return Hibernate.STRING;
- }
-
- public boolean hasArguments() {
- return true;
- }
-
- public boolean hasParenthesesIfNoArguments() {
- return false;
- }
-
- public String render(List args, SessionFactoryImplementor factory) throws QueryException {
- // according to both the ANSI-SQL and EJB3 specs, trim can either take
- // exactly one parameter or a variable number of parameters between 1 and 4.
- // from the SQL spec:
- //
- // <trim function> ::=
- // TRIM <left paren> <trim operands> <right paren>
- //
- // <trim operands> ::=
- // [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
- //
- // <trim specification> ::=
- // LEADING
- // | TRAILING
- // | BOTH
- //
- // If only <trim specification> is omitted, BOTH is assumed;
- // if <trim character> is omitted, space is assumed
- if ( args.size() == 1 ) {
- // we have the form: trim(trimSource)
- // so we trim leading and trailing spaces
- return BOTH_SPACE_TRIM.render( args, factory );
- }
- else if ( "from".equalsIgnoreCase( ( String ) args.get( 0 ) ) ) {
- // we have the form: trim(from trimSource).
- // This is functionally equivalent to trim(trimSource)
- return BOTH_SPACE_TRIM_FROM.render( args, factory );
- }
- else {
- // otherwise, a trim-specification and/or a trim-character
- // have been specified; we need to decide which options
- // are present and "do the right thing"
- boolean leading = true; // should leading trim-characters be trimmed?
- boolean trailing = true; // should trailing trim-characters be trimmed?
- String trimCharacter; // the trim-character
- String trimSource; // the trim-source
-
- // potentialTrimCharacterArgIndex = 1 assumes that a
- // trim-specification has been specified. we handle the
- // exception to that explicitly
- int potentialTrimCharacterArgIndex = 1;
- String firstArg = ( String ) args.get( 0 );
- if ( "leading".equalsIgnoreCase( firstArg ) ) {
- trailing = false;
- }
- else if ( "trailing".equalsIgnoreCase( firstArg ) ) {
- leading = false;
- }
- else if ( "both".equalsIgnoreCase( firstArg ) ) {
- }
- else {
- potentialTrimCharacterArgIndex = 0;
- }
-
- String potentialTrimCharacter = ( String ) args.get( potentialTrimCharacterArgIndex );
- if ( "from".equalsIgnoreCase( potentialTrimCharacter ) ) {
- trimCharacter = "' '";
- trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 1 );
- }
- else if ( potentialTrimCharacterArgIndex + 1 >= args.size() ) {
- trimCharacter = "' '";
- trimSource = potentialTrimCharacter;
- }
- else {
- trimCharacter = potentialTrimCharacter;
- if ( "from".equalsIgnoreCase( ( String ) args.get( potentialTrimCharacterArgIndex + 1 ) ) ) {
- trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 2 );
- }
- else {
- trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 1 );
- }
- }
-
- List argsToUse = new ArrayList();
- argsToUse.add( trimSource );
- argsToUse.add( trimCharacter );
-
- if ( trimCharacter.equals( "' '" ) ) {
- if ( leading && trailing ) {
- return BOTH_SPACE_TRIM.render( argsToUse, factory );
- }
- else if ( leading ) {
- return LEADING_SPACE_TRIM.render( argsToUse, factory );
- }
- else {
- return TRAILING_SPACE_TRIM.render( argsToUse, factory );
- }
- }
- else {
- throw new HibernateException( "cannot specify trim character when using Derby as Derby does not support the ANSI trim function, not does it support a replace function to properly emmulate it" );
- }
- }
- }
- }
-
-
- // Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- public boolean supportsLobValueChangePropogation() {
- return false;
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/DerbyDialect.java (from rev 15158, core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/DerbyDialect.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/DerbyDialect.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/DerbyDialect.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,221 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.dialect;
+
+import org.hibernate.Hibernate;
+import org.hibernate.QueryException;
+import org.hibernate.HibernateException;
+import org.hibernate.engine.Mapping;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.type.Type;
+import org.hibernate.dialect.function.SQLFunction;
+import org.hibernate.dialect.function.SQLFunctionTemplate;
+import org.hibernate.dialect.function.DerbyConcatFunction;
+import org.hibernate.id.TableHiLoGenerator;
+import org.hibernate.sql.CaseFragment;
+import org.hibernate.sql.DerbyCaseFragment;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Hibernate Dialect for Cloudscape 10 - aka Derby. This implements both an
+ * override for the identity column generator as well as for the case statement
+ * issue documented at:
+ * http://www.jroller.com/comments/kenlars99/Weblog/cloudscape_soon_to_be_derby
+ *
+ * @author Simon Johnston
+ */
+public class DerbyDialect extends DB2Dialect {
+
+ public DerbyDialect() {
+ super();
+ registerFunction( "concat", new DerbyConcatFunction() );
+ registerFunction( "trim", new DerbyTrimFunctionEmulation() );
+ }
+
+ /**
+ * This is different in Cloudscape to DB2.
+ */
+ public String getIdentityColumnString() {
+ return "not null generated always as identity"; //$NON-NLS-1
+ }
+
+ /**
+ * Return the case statement modified for Cloudscape.
+ */
+ public CaseFragment createCaseFragment() {
+ return new DerbyCaseFragment();
+ }
+
+ public boolean dropConstraints() {
+ return true;
+ }
+
+ public Class getNativeIdentifierGeneratorClass() {
+ return TableHiLoGenerator.class;
+ }
+
+ public boolean supportsSequences() {
+ return false;
+ }
+
+ public boolean supportsLimit() {
+ return false;
+ }
+
+ public boolean supportsLimitOffset() {
+ return false;
+ }
+
+ public String getQuerySequencesString() {
+ return null ;
+ }
+
+ /**
+ * A specialized function template to emulate the ANSI trim function on Derby DB
+ * since it does not support the full trim specification. However, we cannot even
+ * fully emulate it because there is not standard 'replace' function either. :(
+ */
+ public static class DerbyTrimFunctionEmulation implements SQLFunction {
+ private static final SQLFunction LEADING_SPACE_TRIM = new SQLFunctionTemplate( Hibernate.STRING, "ltrim( ?1 )");
+ private static final SQLFunction TRAILING_SPACE_TRIM = new SQLFunctionTemplate( Hibernate.STRING, "rtrim( ?1 )");
+ private static final SQLFunction BOTH_SPACE_TRIM = new SQLFunctionTemplate( Hibernate.STRING, "ltrim( rtrim( ?1 ) )");
+ private static final SQLFunction BOTH_SPACE_TRIM_FROM = new SQLFunctionTemplate( Hibernate.STRING, "ltrim( rtrim( ?2 ) )");
+
+ public Type getReturnType(Type columnType, Mapping mapping) throws QueryException {
+ return Hibernate.STRING;
+ }
+
+ public boolean hasArguments() {
+ return true;
+ }
+
+ public boolean hasParenthesesIfNoArguments() {
+ return false;
+ }
+
+ public String render(List args, SessionFactoryImplementor factory) throws QueryException {
+ // according to both the ANSI-SQL and EJB3 specs, trim can either take
+ // exactly one parameter or a variable number of parameters between 1 and 4.
+ // from the SQL spec:
+ //
+ // <trim function> ::=
+ // TRIM <left paren> <trim operands> <right paren>
+ //
+ // <trim operands> ::=
+ // [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
+ //
+ // <trim specification> ::=
+ // LEADING
+ // | TRAILING
+ // | BOTH
+ //
+ // If only <trim specification> is omitted, BOTH is assumed;
+ // if <trim character> is omitted, space is assumed
+ if ( args.size() == 1 ) {
+ // we have the form: trim(trimSource)
+ // so we trim leading and trailing spaces
+ return BOTH_SPACE_TRIM.render( args, factory );
+ }
+ else if ( "from".equalsIgnoreCase( ( String ) args.get( 0 ) ) ) {
+ // we have the form: trim(from trimSource).
+ // This is functionally equivalent to trim(trimSource)
+ return BOTH_SPACE_TRIM_FROM.render( args, factory );
+ }
+ else {
+ // otherwise, a trim-specification and/or a trim-character
+ // have been specified; we need to decide which options
+ // are present and "do the right thing"
+ boolean leading = true; // should leading trim-characters be trimmed?
+ boolean trailing = true; // should trailing trim-characters be trimmed?
+ String trimCharacter; // the trim-character
+ String trimSource; // the trim-source
+
+ // potentialTrimCharacterArgIndex = 1 assumes that a
+ // trim-specification has been specified. we handle the
+ // exception to that explicitly
+ int potentialTrimCharacterArgIndex = 1;
+ String firstArg = ( String ) args.get( 0 );
+ if ( "leading".equalsIgnoreCase( firstArg ) ) {
+ trailing = false;
+ }
+ else if ( "trailing".equalsIgnoreCase( firstArg ) ) {
+ leading = false;
+ }
+ else if ( "both".equalsIgnoreCase( firstArg ) ) {
+ }
+ else {
+ potentialTrimCharacterArgIndex = 0;
+ }
+
+ String potentialTrimCharacter = ( String ) args.get( potentialTrimCharacterArgIndex );
+ if ( "from".equalsIgnoreCase( potentialTrimCharacter ) ) {
+ trimCharacter = "' '";
+ trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 1 );
+ }
+ else if ( potentialTrimCharacterArgIndex + 1 >= args.size() ) {
+ trimCharacter = "' '";
+ trimSource = potentialTrimCharacter;
+ }
+ else {
+ trimCharacter = potentialTrimCharacter;
+ if ( "from".equalsIgnoreCase( ( String ) args.get( potentialTrimCharacterArgIndex + 1 ) ) ) {
+ trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 2 );
+ }
+ else {
+ trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 1 );
+ }
+ }
+
+ List argsToUse = new ArrayList();
+ argsToUse.add( trimSource );
+ argsToUse.add( trimCharacter );
+
+ if ( trimCharacter.equals( "' '" ) ) {
+ if ( leading && trailing ) {
+ return BOTH_SPACE_TRIM.render( argsToUse, factory );
+ }
+ else if ( leading ) {
+ return LEADING_SPACE_TRIM.render( argsToUse, factory );
+ }
+ else {
+ return TRAILING_SPACE_TRIM.render( argsToUse, factory );
+ }
+ }
+ else {
+ throw new HibernateException( "cannot specify trim character when using Derby as Derby does not support the ANSI trim function, not does it support a replace function to properly emmulate it" );
+ }
+ }
+ }
+ }
+
+
+ // Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ public boolean supportsLobValueChangePropogation() {
+ return false;
+ }
+}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/DerbyConcatFunction.java (from rev 15158, core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/function/DerbyConcatFunction.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/DerbyConcatFunction.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/DerbyConcatFunction.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,179 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.dialect.function;
+
+import java.util.List;
+import java.util.Iterator;
+
+import org.hibernate.Hibernate;
+import org.hibernate.QueryException;
+import org.hibernate.engine.Mapping;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.type.Type;
+
+/**
+ * A specialized concat() function definition in which:<ol>
+ * <li>we translate to use the concat operator ('||')</li>
+ * <li>wrap dynamic parameters in CASTs to VARCHAR</li>
+ * </ol>
+ * <p/>
+ * This last spec is to deal with a limitation on DB2 and variants (e.g. Derby)
+ * where dynamic parameters cannot be used in concatenation unless they are being
+ * concatenated with at least one non-dynamic operand. And even then, the rules
+ * are so convoluted as to what is allowed and when the CAST is needed and when
+ * it is not that we just go ahead and do the CASTing.
+ *
+ * @author Steve Ebersole
+ */
+public class DerbyConcatFunction implements SQLFunction {
+ /**
+ * {@inheritDoc}
+ * <p/>
+ * Here we always return {@link Hibernate#STRING}.
+ */
+ public Type getReturnType(Type columnType, Mapping mapping) throws QueryException {
+ return Hibernate.STRING;
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p/>
+ * Here we always return <tt>true</tt>
+ */
+ public boolean hasArguments() {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p/>
+ * Here we always return <tt>true</tt>
+ */
+ public boolean hasParenthesesIfNoArguments() {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p/>
+ * Here's the meat.. The whole reason we have a separate impl for this for Derby is to re-define
+ * this method. The logic here says that if not all the incoming args are dynamic parameters
+ * (i.e. <tt>?</tt>) then we simply use the Derby concat operator (<tt>||</tt>) on the unchanged
+ * arg elements. However, if all the args are dynamic parameters, then we need to wrap the individual
+ * arg elements in <tt>cast</tt> function calls, use the concantenation operator on the <tt>cast</tt>
+ * returns, and then wrap that whole thing in a call to the Derby <tt>varchar</tt> function.
+ */
+ public String render(List args, SessionFactoryImplementor factory) throws QueryException {
+ boolean areAllArgsParams = true;
+ Iterator itr = args.iterator();
+ while ( itr.hasNext() ) {
+ final String arg = ( String ) itr.next();
+ if ( ! "?".equals( arg ) ) {
+ areAllArgsParams = false;
+ break;
+ }
+ }
+
+ if ( areAllArgsParams ) {
+ return join(
+ args.iterator(),
+ new StringTransformer() {
+ public String transform(String string) {
+ return "cast( ? as varchar(32672) )";
+ }
+ },
+ new StringJoinTemplate() {
+ public String getBeginning() {
+ return "varchar( ";
+ }
+ public String getSeparator() {
+ return " || ";
+ }
+ public String getEnding() {
+ return " )";
+ }
+ }
+ );
+ }
+ else {
+ return join(
+ args.iterator(),
+ new StringTransformer() {
+ public String transform(String string) {
+ return string;
+ }
+ },
+ new StringJoinTemplate() {
+ public String getBeginning() {
+ return "(";
+ }
+ public String getSeparator() {
+ return "||";
+ }
+ public String getEnding() {
+ return ")";
+ }
+ }
+ );
+ }
+ }
+
+ private static interface StringTransformer {
+ public String transform(String string);
+ }
+
+ private static interface StringJoinTemplate {
+ /**
+ * Getter for property 'beginning'.
+ *
+ * @return Value for property 'beginning'.
+ */
+ public String getBeginning();
+ /**
+ * Getter for property 'separator'.
+ *
+ * @return Value for property 'separator'.
+ */
+ public String getSeparator();
+ /**
+ * Getter for property 'ending'.
+ *
+ * @return Value for property 'ending'.
+ */
+ public String getEnding();
+ }
+
+ private String join(Iterator/*<String>*/ elements, StringTransformer elementTransformer, StringJoinTemplate template) {
+ StringBuffer buffer = new StringBuffer( template.getBeginning() );
+ while ( elements.hasNext() ) {
+ final String element = ( String ) elements.next();
+ buffer.append( elementTransformer.transform( element ) );
+ if ( elements.hasNext() ) {
+ buffer.append( template.getSeparator() );
+ }
+ }
+ return buffer.append( template.getEnding() ).toString();
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,81 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.dialect.function;
-
-import java.util.List;
-
-import org.hibernate.QueryException;
-import org.hibernate.engine.Mapping;
-import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.type.Type;
-
-/**
- * Support for slightly more general templating than <tt>StandardSQLFunction</tt>,
- * with an unlimited number of arguments.
- * @author Gavin King
- */
-public class VarArgsSQLFunction implements SQLFunction {
-
- private final String begin;
- private final String sep;
- private final String end;
- private final Type type;
-
- public VarArgsSQLFunction(Type type, String begin, String sep, String end) {
- this.begin = begin;
- this.sep = sep;
- this.end = end;
- this.type = type;
- }
-
- public VarArgsSQLFunction(String begin, String sep, String end) {
- this.begin = begin;
- this.sep = sep;
- this.end = end;
- this.type = null;
- }
-
- public Type getReturnType(Type columnType, Mapping mapping) throws QueryException {
- return type==null ? columnType : type;
- }
-
- public boolean hasArguments() {
- return true;
- }
-
- public boolean hasParenthesesIfNoArguments() {
- return true;
- }
-
- public String render(List args, SessionFactoryImplementor factory) throws QueryException {
- StringBuffer buf = new StringBuffer().append(begin);
- for ( int i=0; i<args.size(); i++ ) {
- buf.append( args.get(i) );
- if (i<args.size()-1) buf.append(sep);
- }
- return buf.append(end).toString();
- }
-
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java (from rev 15158, core/branches/Branch_3_3/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/dialect/function/VarArgsSQLFunction.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,128 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.dialect.function;
+
+import java.util.List;
+
+import org.hibernate.QueryException;
+import org.hibernate.engine.Mapping;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.type.Type;
+
+/**
+ * Support for slightly more general templating than {@link StandardSQLFunction},
+ * with an unlimited number of arguments.
+ *
+ * @author Gavin King
+ */
+public class VarArgsSQLFunction implements SQLFunction {
+ private final String begin;
+ private final String sep;
+ private final String end;
+ private final Type type;
+
+ /**
+ * Constructs a VarArgsSQLFunction instance with a 'static' return type. An example of a 'static'
+ * return type would be something like an <tt>UPPER</tt> function which is always returning
+ * a SQL VARCHAR and thus a string type.
+ *
+ * @param type The return type.
+ * @param begin The beginning of the function templating.
+ * @param sep The separator for each individual function argument.
+ * @param end The end of the function templating.
+ */
+ public VarArgsSQLFunction(Type type, String begin, String sep, String end) {
+ this.type = type;
+ this.begin = begin;
+ this.sep = sep;
+ this.end = end;
+ }
+
+ /**
+ * Constructs a VarArgsSQLFunction instance with a 'dynamic' return type. For a dynamic return type,
+ * the type of the arguments are used to resolve the type. An example of a function with a
+ * 'dynamic' return would be <tt>MAX</tt> or <tt>MIN</tt> which return a double or an integer etc
+ * based on the types of the arguments.
+ *
+ * @param begin The beginning of the function templating.
+ * @param sep The separator for each individual function argument.
+ * @param end The end of the function templating.
+ *
+ * @see #getReturnType Specifically, the 'columnType' argument is the 'dynamic' type.
+ */
+ public VarArgsSQLFunction(String begin, String sep, String end) {
+ this( null, begin, sep, end );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Type getReturnType(Type columnType, Mapping mapping) throws QueryException {
+ return type == null ? columnType : type;
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p/>
+ * Always returns true here.
+ */
+ public boolean hasArguments() {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p/>
+ * Always returns true here.
+ */
+ public boolean hasParenthesesIfNoArguments() {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String render(List args, SessionFactoryImplementor factory) throws QueryException {
+ StringBuffer buf = new StringBuffer().append( begin );
+ for ( int i = 0; i < args.size(); i++ ) {
+ buf.append( transformArgument( ( String ) args.get( i ) ) );
+ if ( i < args.size() - 1 ) {
+ buf.append( sep );
+ }
+ }
+ return buf.append( end ).toString();
+ }
+
+ /**
+ * Called from {@link #render} to allow applying a change or transformation to each individual
+ * argument.
+ *
+ * @param argument The argument being processed.
+ * @return The transformed argument; may be the same, though should never be null.
+ */
+ protected String transformArgument(String argument) {
+ return argument;
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,99 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.transform;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.io.Serializable;
-
-/**
- * {@link ResultTransformer} implementation which builds a map for each "row",
- * made up of each aliased value where the alias is the map key.
- * <p/>
- * Since this transformer is stateless, all instances would be considered equal.
- * So for optimization purposes we limit it to a single, singleton {@link #INSTANCE instance}.
- *
- * @author Gavin King
- * @author Steve Ebersole
- */
-public class AliasToEntityMapResultTransformer extends BasicTransformerAdapter implements Serializable {
-
- public static final AliasToEntityMapResultTransformer INSTANCE = new AliasToEntityMapResultTransformer();
-
- /**
- * Instantiate AliasToEntityMapResultTransformer.
- *
- * @deprecated Use the {@link #INSTANCE} reference instead of explicitly creating a new one.
- */
- public AliasToEntityMapResultTransformer() {
- // todo : make private
- }
-
- public Object transformTuple(Object[] tuple, String[] aliases) {
- Map result = new HashMap(tuple.length);
- for ( int i=0; i<tuple.length; i++ ) {
- String alias = aliases[i];
- if ( alias!=null ) {
- result.put( alias, tuple[i] );
- }
- }
- return result;
- }
-
- /**
- * Serialization hook for ensuring singleton uniqueing.
- *
- * @return The singleton instance : {@link #INSTANCE}
- */
- private Object readResolve() {
- return INSTANCE;
- }
-
-
- // all AliasToEntityMapResultTransformer are considered equal ~~~~~~~~~~~~~
-
- /**
- * All AliasToEntityMapResultTransformer are considered equal
- *
- * @param other The other instance to check for equality
- * @return True if (non-null) other is a instance of
- * AliasToEntityMapResultTransformer.
- */
- public boolean equals(Object other) {
- // todo : we can remove this once the deprecated ctor can be made private...
- return other != null && AliasToEntityMapResultTransformer.class.isInstance( other );
- }
-
- /**
- * All AliasToEntityMapResultTransformer are considered equal
- *
- * @return We simply return the hashCode of the
- * AliasToEntityMapResultTransformer class name string.
- */
- public int hashCode() {
- // todo : we can remove this once the deprecated ctor can be made private...
- return getClass().getName().hashCode();
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java (from rev 15175, core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/AliasToEntityMapResultTransformer.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,102 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.transform;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.io.Serializable;
+
+/**
+ * {@link ResultTransformer} implementation which builds a map for each "row", made up of each aliased value
+ * where the alias is the map key.
+ * <p/>
+ * Since this transformer is stateless, all instances would be considered equal. So for optimization purposes
+ * we limit it to a single, singleton {@link #INSTANCE instance} (this is not quite true yet, see deprecation notice
+ * on {@link #AliasToEntityMapResultTransformer() constructor}).
+ *
+ * @author Gavin King
+ * @author Steve Ebersole
+ */
+public class AliasToEntityMapResultTransformer extends BasicTransformerAdapter implements Serializable {
+
+ public static final AliasToEntityMapResultTransformer INSTANCE = new AliasToEntityMapResultTransformer();
+
+ /**
+ * Instantiate AliasToEntityMapResultTransformer.
+ * <p/>
+ * todo : make private, see deprecation...
+ *
+ * @deprecated Use the {@link #INSTANCE} reference instead of explicitly creating a new one (to be removed in 3.4).
+ */
+ public AliasToEntityMapResultTransformer() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object transformTuple(Object[] tuple, String[] aliases) {
+ Map result = new HashMap(tuple.length);
+ for ( int i=0; i<tuple.length; i++ ) {
+ String alias = aliases[i];
+ if ( alias!=null ) {
+ result.put( alias, tuple[i] );
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Serialization hook for ensuring singleton uniqueing.
+ *
+ * @return The singleton instance : {@link #INSTANCE}
+ */
+ private Object readResolve() {
+ return INSTANCE;
+ }
+
+
+ // all AliasToEntityMapResultTransformer are considered equal ~~~~~~~~~~~~~
+
+ /**
+ * All AliasToEntityMapResultTransformer are considered equal
+ *
+ * @param other The other instance to check for equality
+ * @return True if (non-null) other is a instance of AliasToEntityMapResultTransformer.
+ */
+ public boolean equals(Object other) {
+ // todo : we can remove this once the deprecated ctor can be made private...
+ return other != null && AliasToEntityMapResultTransformer.class.isInstance( other );
+ }
+
+ /**
+ * All AliasToEntityMapResultTransformer are considered equal
+ *
+ * @return We simply return the hashCode of the AliasToEntityMapResultTransformer class name string.
+ */
+ public int hashCode() {
+ // todo : we can remove this once the deprecated ctor can be made private...
+ return getClass().getName().hashCode();
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,42 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.transform;
-
-import java.util.List;
-
-/**
- * Provides the basic "noop" impls of the {@link ResultTransformer} contract.
- *
- * @author Steve Ebersole
- */
-public abstract class BasicTransformerAdapter implements ResultTransformer {
- public Object transformTuple(Object[] tuple, String[] aliases) {
- return tuple;
- }
-
- public List transformList(List list) {
- return list;
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java (from rev 15175, core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/BasicTransformerAdapter.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,48 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.transform;
+
+import java.util.List;
+
+/**
+ * Provides the basic "noop" impls of the {@link ResultTransformer} contract.
+ *
+ * @author Steve Ebersole
+ */
+public abstract class BasicTransformerAdapter implements ResultTransformer {
+ /**
+ * {@inheritDoc}
+ */
+ public Object transformTuple(Object[] tuple, String[] aliases) {
+ return tuple;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List transformList(List list) {
+ return list;
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,86 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.transform;
-
-import java.util.List;
-import java.io.Serializable;
-
-/**
- * Much like {@link RootEntityResultTransformer}, but we also distinct
- * the entity in the final result.
- * <p/>
- * Since this transformer is stateless, all instances would be considered equal.
- * So for optimization purposes we limit it to a single, singleton {@link #INSTANCE instance}.
- *
- * @author Gavin King
- * @author Steve Ebersole
- */
-public class DistinctRootEntityResultTransformer implements ResultTransformer, Serializable {
-
- public static final DistinctRootEntityResultTransformer INSTANCE = new DistinctRootEntityResultTransformer();
-
- /**
- * Instantiate a DistinctRootEntityResultTransformer.
- *
- * @deprecated Use the {@link #INSTANCE} reference instead of explicitly creating a new one.
- */
- public DistinctRootEntityResultTransformer() {
- }
-
- /**
- * Simply delegates to {@link RootEntityResultTransformer#transformTuple}.
- *
- * @param tuple The tuple to transform
- * @param aliases The tuple aliases
- * @return The transformed tuple row.
- */
- public Object transformTuple(Object[] tuple, String[] aliases) {
- return RootEntityResultTransformer.INSTANCE.transformTuple( tuple, aliases );
- }
-
- /**
- * Simply delegates to {@link DistinctResultTransformer#transformList}.
- *
- * @param list The list to transform.
- * @return The transformed List.
- */
- public List transformList(List list) {
- return DistinctResultTransformer.INSTANCE.transformList( list );
- }
-
- /**
- * Serialization hook for ensuring singleton uniqueing.
- *
- * @return The singleton instance : {@link #INSTANCE}
- */
- private Object readResolve() {
- return INSTANCE;
- }
-
- public boolean equals(Object obj) {
- // todo : we can remove this once the deprecated ctor can be made private...
- return DistinctRootEntityResultTransformer.class.isInstance( obj );
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java (from rev 15175, core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/DistinctRootEntityResultTransformer.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,96 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.transform;
+
+import java.util.List;
+import java.io.Serializable;
+
+/**
+ * Much like {@link RootEntityResultTransformer}, but we also distinct the entity in the final result.
+ * <p/>
+ * Since this transformer is stateless, all instances would be considered equal. So for optimization purposes
+ * we limit it to a single, singleton {@link #INSTANCE instance} (this is not quite true yet: see deprecation notice
+ * on {@link #DistinctRootEntityResultTransformer() constructor}).
+ *
+ * @author Gavin King
+ * @author Steve Ebersole
+ */
+public class DistinctRootEntityResultTransformer implements ResultTransformer, Serializable {
+
+ public static final DistinctRootEntityResultTransformer INSTANCE = new DistinctRootEntityResultTransformer();
+
+ /**
+ * Instantiate a DistinctRootEntityResultTransformer.
+ * <p/>
+ * todo : make private, see deprecation notice
+ *
+ * @deprecated Use the {@link #INSTANCE} reference instead of explicitly creating a new one (to be removed in 3.4).
+ */
+ public DistinctRootEntityResultTransformer() {
+ }
+
+ /**
+ * Simply delegates to {@link RootEntityResultTransformer#transformTuple}.
+ *
+ * @param tuple The tuple to transform
+ * @param aliases The tuple aliases
+ * @return The transformed tuple row.
+ */
+ public Object transformTuple(Object[] tuple, String[] aliases) {
+ return RootEntityResultTransformer.INSTANCE.transformTuple( tuple, aliases );
+ }
+
+ /**
+ * Simply delegates to {@link DistinctResultTransformer#transformList}.
+ *
+ * @param list The list to transform.
+ * @return The transformed List.
+ */
+ public List transformList(List list) {
+ return DistinctResultTransformer.INSTANCE.transformList( list );
+ }
+
+ /**
+ * Serialization hook for ensuring singleton uniqueing.
+ *
+ * @return The singleton instance : {@link #INSTANCE}
+ */
+ private Object readResolve() {
+ return INSTANCE;
+ }
+
+
+ // all DistinctRootEntityResultTransformer are considered equal ~~~~~~~~~~~
+
+ public int hashCode() {
+ // todo : we can remove this once the deprecated ctor can be made private...
+ return DistinctRootEntityResultTransformer.class.getName().hashCode();
+ }
+
+ public boolean equals(Object other) {
+ // todo : we can remove this once the deprecated ctor can be made private...
+ return other != null && DistinctRootEntityResultTransformer.class.isInstance( other );
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,64 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.transform;
-
-import java.io.Serializable;
-
-/**
- * ???
- *
- * @author max
- */
-public class PassThroughResultTransformer extends BasicTransformerAdapter implements Serializable {
-
- public static final PassThroughResultTransformer INSTANCE = new PassThroughResultTransformer();
-
- /**
- * Instamtiate a PassThroughResultTransformer.
- *
- * @deprecated Use the {@link #INSTANCE} reference instead of explicitly creating a new one.
- */
- public PassThroughResultTransformer() {
- }
-
- public Object transformTuple(Object[] tuple, String[] aliases) {
- return tuple.length==1 ? tuple[0] : tuple;
- }
-
- /**
- * Serialization hook for ensuring singleton uniqueing.
- *
- * @return The singleton instance : {@link #INSTANCE}
- */
- private Object readResolve() {
- return INSTANCE;
- }
-
- public boolean equals(Object obj) {
- // todo : we can remove this once the deprecated ctor can be made private...
- return PassThroughResultTransformer.class.isInstance( obj );
- }
-
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java (from rev 15175, core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,69 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.transform;
+
+import java.io.Serializable;
+
+/**
+ * ???
+ *
+ * @author max
+ */
+public class PassThroughResultTransformer extends BasicTransformerAdapter implements Serializable {
+
+ public static final PassThroughResultTransformer INSTANCE = new PassThroughResultTransformer();
+
+ /**
+ * Instamtiate a PassThroughResultTransformer.
+ *
+ * @deprecated Use the {@link #INSTANCE} reference instead of explicitly creating a new one (to be removed in 3.4).
+ */
+ public PassThroughResultTransformer() {
+ }
+
+ public Object transformTuple(Object[] tuple, String[] aliases) {
+ return tuple.length==1 ? tuple[0] : tuple;
+ }
+
+ /**
+ * Serialization hook for ensuring singleton uniqueing.
+ *
+ * @return The singleton instance : {@link #INSTANCE}
+ */
+ private Object readResolve() {
+ return INSTANCE;
+ }
+
+ public int hashCode() {
+ // todo : we can remove this once the deprecated ctor can be made private...
+ return PassThroughResultTransformer.class.getName().hashCode();
+ }
+
+ public boolean equals(Object other) {
+ // todo : we can remove this once the deprecated ctor can be made private...
+ return other != null && PassThroughResultTransformer.class.isInstance( other );
+ }
+
+}
Deleted: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java 2008-08-29 18:42:57 UTC (rev 15151)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,72 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- *
- */
-package org.hibernate.transform;
-
-import java.util.List;
-import java.io.Serializable;
-
-/**
- * {@link ResultTransformer} implementation which limits the result tuple
- * to only the "root entity".
- * <p/>
- * Since this transformer is stateless, all instances would be considered equal.
- * So for optimization purposes we limit it to a single, singleton {@link #INSTANCE instance}.
- *
- * @author Gavin King
- * @author Steve Ebersole
- */
-public final class RootEntityResultTransformer extends BasicTransformerAdapter implements Serializable {
-
- public static final RootEntityResultTransformer INSTANCE = new RootEntityResultTransformer();
-
- /**
- * Instantiate RootEntityResultTransformer.
- *
- * @deprecated Use the {@link #INSTANCE} reference instead of explicitly creating a new one.
- */
- public RootEntityResultTransformer() {
- }
-
- /**
- * Return just the root entity from the row tuple.
- */
- public Object transformTuple(Object[] tuple, String[] aliases) {
- return tuple[ tuple.length-1 ];
- }
-
- /**
- * Serialization hook for ensuring singleton uniqueing.
- *
- * @return The singleton instance : {@link #INSTANCE}
- */
- private Object readResolve() {
- return INSTANCE;
- }
-
- public boolean equals(Object obj) {
- // todo : we can remove this once the deprecated ctor can be made private...
- return RootEntityResultTransformer.class.isInstance( obj );
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java (from rev 15175, core/branches/Branch_3_3/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,77 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.transform;
+
+import java.util.List;
+import java.io.Serializable;
+
+/**
+ * {@link ResultTransformer} implementation which limits the result tuple
+ * to only the "root entity".
+ * <p/>
+ * Since this transformer is stateless, all instances would be considered equal.
+ * So for optimization purposes we limit it to a single, singleton {@link #INSTANCE instance}.
+ *
+ * @author Gavin King
+ * @author Steve Ebersole
+ */
+public final class RootEntityResultTransformer extends BasicTransformerAdapter implements Serializable {
+
+ public static final RootEntityResultTransformer INSTANCE = new RootEntityResultTransformer();
+
+ /**
+ * Instantiate RootEntityResultTransformer.
+ *
+ * @deprecated Use the {@link #INSTANCE} reference instead of explicitly creating a new one (to be removed in 3.4).
+ */
+ public RootEntityResultTransformer() {
+ }
+
+ /**
+ * Return just the root entity from the row tuple.
+ */
+ public Object transformTuple(Object[] tuple, String[] aliases) {
+ return tuple[ tuple.length-1 ];
+ }
+
+ /**
+ * Serialization hook for ensuring singleton uniqueing.
+ *
+ * @return The singleton instance : {@link #INSTANCE}
+ */
+ private Object readResolve() {
+ return INSTANCE;
+ }
+
+ public int hashCode() {
+ // todo : we can remove this once the deprecated ctor can be made private...
+ return RootEntityResultTransformer.class.getName().hashCode();
+ }
+
+ public boolean equals(Object other) {
+ // todo : we can remove this once the deprecated ctor can be made private...
+ return other != null && RootEntityResultTransformer.class.isInstance( other );
+ }
+}
Copied: core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/type/NumericBooleanType.java (from rev 15164, core/branches/Branch_3_3/core/src/main/java/org/hibernate/type/NumericBooleanType.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/type/NumericBooleanType.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/core/src/main/java/org/hibernate/type/NumericBooleanType.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,94 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ *
+ */
+package org.hibernate.type;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.PreparedStatement;
+import java.sql.Types;
+
+import org.hibernate.dialect.Dialect;
+
+/**
+ * Maps {@link Types#INTEGER interger} database values to boolean java values. Zero is considered false;
+ * <tt>NULL</tt> maps to {@link #getDefaultValue()}; any other value is considered true.
+ *
+ * @author Steve Ebersole
+ * @see #getName()
+ */
+public class NumericBooleanType extends BooleanType {
+
+ /**
+ * {@inheritDoc}
+ * <p/>
+ * This type's name is <tt>numeric_boolean</tt>
+ */
+ public String getName() {
+ return "numeric_boolean";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object get(ResultSet rs, String name) throws SQLException {
+ int value = rs.getInt( name );
+ if ( rs.wasNull() ) {
+ return getDefaultValue();
+ }
+ else if ( value == 0 ) {
+ return Boolean.FALSE;
+ }
+ else {
+ return Boolean.TRUE;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void set(PreparedStatement st, Object value, int index) throws SQLException {
+ if ( value == null ) {
+ st.setNull( index, Types.INTEGER );
+ }
+ else {
+ boolean bool = ( ( Boolean ) value ).booleanValue();
+ st.setInt( index, bool ? 1 : 0 );
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String objectToSQLString(Object value, Dialect dialect) throws Exception {
+ return ( ( Boolean ) value ).booleanValue() ? "1" : "0";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int sqlType() {
+ return Types.INTEGER;
+ }
+}
Copied: core/tags/hibernate-3.3.1.GA/core/src/test/java/org/hibernate/cache (from rev 15175, core/branches/Branch_3_3/core/src/test/java/org/hibernate/cache)
Deleted: core/tags/hibernate-3.3.1.GA/distribution/pom.xml
===================================================================
--- core/branches/Branch_3_3/distribution/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/distribution/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ Hibernate, Relational Persistence for Idiomatic Java
- ~
- ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- ~ indicated by the @author tags or express copyright attribution
- ~ statements applied by the authors. All third-party contributions are
- ~ distributed under license by Red Hat Middleware LLC.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, as published by the Free Software Foundation.
- ~
- ~ This program is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- ~ for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public License
- ~ along with this distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-distribution</artifactId>
- <packaging>pom</packaging>
-
- <name>Hibernate Distribution</name>
- <description>Builds the complete Hibernate distribution bundles</description>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
- <configuration>
- <descriptors>
- <descriptor>src/assembly/hibernate-all.xml</descriptor>
- <descriptor>src/assembly/dist.xml</descriptor>
- </descriptors>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <!--
- The assemblies work off of dependency sets since the stuff to be
- aggregated is no longer sub-modules after moving assembly itself
- into this 'distribution' module.
- -->
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-jmx</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-ehcache</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-jbosscache</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-jbosscache2</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-oscache</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-swarmcache</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-c3p0</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>hibernate-proxool</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <!-- optional deps for bytecode providers since they are optional on core -->
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.GA</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib</artifactId>
- <version>2.1_3</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>asm</groupId>
- <artifactId>asm-attrs</artifactId>
- <version>1.5.3</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
-
- <profiles>
- <profile>
- <!--
- A profile used implicitly by the release plugin. Here we use
- it to implicitly execute assembly building when deploy is executed
- as part of release ( I think/hope :p )
- -->
- <id>release-profile</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
- <executions>
- <execution>
- <phase>deploy</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/distribution/pom.xml (from rev 15183, core/branches/Branch_3_3/distribution/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/distribution/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/distribution/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-distribution</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Hibernate Distribution</name>
+ <description>Builds the complete Hibernate distribution bundles</description>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-2</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/hibernate-all.xml</descriptor>
+ <descriptor>src/assembly/dist.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <!--
+ The assemblies work off of dependency sets since the stuff to be
+ aggregated is no longer sub-modules after moving assembly itself
+ into this 'distribution' module.
+ -->
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-jmx</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-ehcache</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-jbosscache</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-jbosscache2</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-oscache</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-swarmcache</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-c3p0</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>hibernate-proxool</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- optional deps for bytecode providers since they are optional on core -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-cglib-repack</artifactId>
+ <version>2.1_3</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <!--
+ A profile used implicitly by the release plugin. Here we use
+ it to implicitly execute assembly building when deploy is executed
+ as part of release ( I think/hope :p )
+ -->
+ <id>release-profile</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-2</version>
+ <executions>
+ <execution>
+ <phase>deploy</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Deleted: core/tags/hibernate-3.3.1.GA/documentation/manual/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/manual/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/documentation/manual/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,101 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-manual</artifactId>
- <packaging>jdocbook</packaging>
-
- <name>Hibernate Manual</name>
- <description>The Hibernate reference manual</description>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.1.2</version>
- <extensions>true</extensions>
- <executions>
- <execution>
- <!--
- here we are attaching the translate goal so that the translations are processed
- before compilation so that the transated XML is also transformed during
- generation
- -->
- <phase>process-resources</phase>
- <goals>
- <goal>translate</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-jdocbook-style</artifactId>
- <version>1.0.2</version>
- <type>jdocbook-style</type>
- </dependency>
- </dependencies>
- <configuration>
- <sourceDocumentName>Hibernate_Reference.xml</sourceDocumentName>
- <masterTranslation>en-US</masterTranslation>
- <translations>
-<!--
- <translation>es-ES</translation>
--->
- <translation>fr-FR</translation>
- <translation>ja-JP</translation>
- <translation>ko-KR</translation>
-<!--
- <translation>pt-BR</translation>
--->
- <translation>zh-CN</translation>
- </translations>
- <imageResource>
- <directory>${basedir}/src/main/docbook/en-US</directory>
- <excludes>
- <exclude>*.xml</exclude>
- <exclude>**/*.xml</exclude>
- <exclude>*.zargo</exclude>
- <exclude>**/*.zargo</exclude>
- </excludes>
- </imageResource>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/hibernate/pdf/main-pdf.xsl</stylesheetResource>
- <finalName>hibernate_reference.pdf</finalName>
- <profilingTypeName>two_pass</profilingTypeName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/hibernate/html/main-single.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- <profilingTypeName>two_pass</profilingTypeName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/hibernate/html/main-chunk.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- <profilingTypeName>two_pass</profilingTypeName>
- </format>
- </formats>
- <options>
- <xincludeSupported>true</xincludeSupported>
- <localeSeparator>-</localeSeparator>
- <useRelativeImageUris>false</useRelativeImageUris>
- </options>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/documentation/manual/pom.xml (from rev 15183, core/branches/Branch_3_3/documentation/manual/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/documentation/manual/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/documentation/manual/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,101 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-manual</artifactId>
+ <packaging>jdocbook</packaging>
+
+ <name>Hibernate Manual</name>
+ <description>The Hibernate reference manual</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.1.2</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <!--
+ here we are attaching the translate goal so that the translations are processed
+ before compilation so that the transated XML is also transformed during
+ generation
+ -->
+ <phase>process-resources</phase>
+ <goals>
+ <goal>translate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jdocbook-style</artifactId>
+ <version>1.0.2</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDocumentName>Hibernate_Reference.xml</sourceDocumentName>
+ <masterTranslation>en-US</masterTranslation>
+ <translations>
+<!--
+ <translation>es-ES</translation>
+-->
+ <translation>fr-FR</translation>
+<!--
+ <translation>ja-JP</translation>
+ <translation>ko-KR</translation>
+ <translation>pt-BR</translation>
+ <translation>zh-CN</translation>
+-->
+ </translations>
+ <imageResource>
+ <directory>${basedir}/src/main/docbook/en-US</directory>
+ <excludes>
+ <exclude>*.xml</exclude>
+ <exclude>**/*.xml</exclude>
+ <exclude>*.zargo</exclude>
+ <exclude>**/*.zargo</exclude>
+ </excludes>
+ </imageResource>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/pdf/main-pdf.xsl</stylesheetResource>
+ <finalName>hibernate_reference.pdf</finalName>
+ <profilingTypeName>two_pass</profilingTypeName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/html/main-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ <profilingTypeName>two_pass</profilingTypeName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/html/main-chunk.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ <profilingTypeName>two_pass</profilingTypeName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <localeSeparator>-</localeSeparator>
+ <useRelativeImageUris>false</useRelativeImageUris>
+ </options>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml
===================================================================
--- core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,95 +0,0 @@
-<?xml version='1.0' encoding="UTF-8"?>
-<!--
- ~ Hibernate, Relational Persistence for Idiomatic Java
- ~
- ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- ~ indicated by the @author tags or express copyright attribution
- ~ statements applied by the authors. All third-party contributions are
- ~ distributed under license by Red Hat Middleware LLC.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, as published by the Free Software Foundation.
- ~
- ~ This program is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- ~ for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public License
- ~ along with this distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 51 Franklin Street, Fifth Floor
- ~ Boston, MA 02110-1301 USA
- -->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY versionNumber "3.3.0.GA">
- <!ENTITY copyrightYear "2004">
- <!ENTITY copyrightHolder "Red Hat Middleware, LLC.">
-]>
-
-<book>
-
- <bookinfo>
- <title>HIBERNATE - Relational Persistence for Idiomatic Java</title>
- <subtitle>Hibernate Reference Documentation</subtitle>
- <releaseinfo>&versionNumber;</releaseinfo>
- <productnumber>&versionNumber;</productnumber>
- <issuenum>1</issuenum>
- <mediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/hibernate_logo_a.png" align="center" />
- </imageobject>
- <imageobject role="html">
- <imagedata fileref="images/hibernate_logo_a.png" depth="3cm" />
- </imageobject>
- </mediaobject>
- <copyright>
- <year>©rightYear;</year>
- <holder>©rightHolder;</holder>
- </copyright>
- <xi:include href="legal_notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!-- include translators... -->
- </bookinfo>
-
- <toc/>
-
- <xi:include href="content/preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/tutorial.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/architecture.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/persistent_classes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/basic_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/collection_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/association_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/component_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/inheritance_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/session_api.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/transactions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/events.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/batch.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/query_hql.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/query_criteria.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/query_sql.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/filters.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/xml.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/performance.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/toolset_guide.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/example_parentchild.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/example_weblog.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="content/example_mappings.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
- <xi:include href="content/best_practices.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
-</book>
-
Copied: core/tags/hibernate-3.3.1.GA/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml (from rev 15177, core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,95 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ -->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY versionNumber "3.3.1">
+ <!ENTITY copyrightYear "2004">
+ <!ENTITY copyrightHolder "Red Hat Middleware, LLC.">
+]>
+
+<book>
+
+ <bookinfo>
+ <title>HIBERNATE - Relational Persistence for Idiomatic Java</title>
+ <subtitle>Hibernate Reference Documentation</subtitle>
+ <releaseinfo>&versionNumber;</releaseinfo>
+ <productnumber>&versionNumber;</productnumber>
+ <issuenum>1</issuenum>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/hibernate_logo_a.png" align="center" />
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="images/hibernate_logo_a.png" depth="3cm" />
+ </imageobject>
+ </mediaobject>
+ <copyright>
+ <year>©rightYear;</year>
+ <holder>©rightHolder;</holder>
+ </copyright>
+ <xi:include href="legal_notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- include translators... -->
+ </bookinfo>
+
+ <toc/>
+
+ <xi:include href="content/preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/tutorial.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/architecture.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/persistent_classes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/basic_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/collection_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/association_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/component_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/inheritance_mapping.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/session_api.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/transactions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/events.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/batch.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/query_hql.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/query_criteria.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/query_sql.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/filters.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/xml.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/performance.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/toolset_guide.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/example_parentchild.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/example_weblog.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/example_mappings.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="content/best_practices.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</book>
+
Deleted: core/tags/hibernate-3.3.1.GA/documentation/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/documentation/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,27 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-documentation</artifactId>
- <packaging>pom</packaging>
-
- <name>Hibernate Core - Documentation</name>
- <description>Grouping of Hibernate Core Project documentation modules</description>
-
- <modules>
- <module>releasenotes</module>
- <module>manual</module>
-<!--
- <module>jbosscache2</module>
--->
- </modules>
-
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/documentation/pom.xml (from rev 15183, core/branches/Branch_3_3/documentation/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/documentation/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/documentation/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,27 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-documentation</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Hibernate Core - Documentation</name>
+ <description>Grouping of Hibernate Core Project documentation modules</description>
+
+ <modules>
+ <module>releasenotes</module>
+ <module>manual</module>
+<!--
+ <module>jbosscache2</module>
+-->
+ </modules>
+
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/documentation/releasenotes/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/releasenotes/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/documentation/releasenotes/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,87 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-releasenotes</artifactId>
- <packaging>jdocbook</packaging>
-
- <name>Hibernate Release Notes</name>
- <description>The Hibernate release notes DocBook source module</description>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.1.0</version>
- <extensions>true</extensions>
- <executions>
- <execution>
- <!--
- here we are attaching the translate goal so that the translations are processed
- before compilation so that the transated XML is also transformed during
- generation
- -->
- <phase>process-resources</phase>
- <goals>
- <goal>translate</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-jdocbook-style</artifactId>
- <version>1.0.2</version>
- <type>jdocbook-style</type>
- </dependency>
- </dependencies>
- <configuration>
- <sourceDocumentName>en-US/Release_Notes.xml</sourceDocumentName>
- <masterTranslation>en-US</masterTranslation>
- <imageResource>
- <directory>${basedir}/src/main/docbook/en-US</directory>
- <includes>
- <include>**/*.svg</include>
- <include>**/*.png</include>
- </includes>
- </imageResource>
- <formats>
- <format>
- <formatName>pdf</formatName>
- <stylesheetResource>classpath:/xslt/hibernate/pdf/main-pdf.xsl</stylesheetResource>
- <finalName>Release_Notes.pdf</finalName>
- <profilingTypeName>two_pass</profilingTypeName>
- </format>
- <format>
- <formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/hibernate/html/main-single.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- <profilingTypeName>two_pass</profilingTypeName>
- </format>
- <format>
- <formatName>html</formatName>
- <stylesheetResource>classpath:/xslt/hibernate/html/main-chunk.xsl</stylesheetResource>
- <finalName>index.html</finalName>
- <profilingTypeName>two_pass</profilingTypeName>
- </format>
- </formats>
- <options>
- <xincludeSupported>true</xincludeSupported>
- <localeSeparator>-</localeSeparator>
- <useRelativeImageUris>true</useRelativeImageUris>
- </options>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/documentation/releasenotes/pom.xml (from rev 15183, core/branches/Branch_3_3/documentation/releasenotes/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/documentation/releasenotes/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/documentation/releasenotes/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,87 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-releasenotes</artifactId>
+ <packaging>jdocbook</packaging>
+
+ <name>Hibernate Release Notes</name>
+ <description>The Hibernate release notes DocBook source module</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.1.0</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <!--
+ here we are attaching the translate goal so that the translations are processed
+ before compilation so that the transated XML is also transformed during
+ generation
+ -->
+ <phase>process-resources</phase>
+ <goals>
+ <goal>translate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jdocbook-style</artifactId>
+ <version>1.0.2</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDocumentName>en-US/Release_Notes.xml</sourceDocumentName>
+ <masterTranslation>en-US</masterTranslation>
+ <imageResource>
+ <directory>${basedir}/src/main/docbook/en-US</directory>
+ <includes>
+ <include>**/*.svg</include>
+ <include>**/*.png</include>
+ </includes>
+ </imageResource>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/pdf/main-pdf.xsl</stylesheetResource>
+ <finalName>Release_Notes.pdf</finalName>
+ <profilingTypeName>two_pass</profilingTypeName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/html/main-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ <profilingTypeName>two_pass</profilingTypeName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/hibernate/html/main-chunk.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ <profilingTypeName>two_pass</profilingTypeName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <localeSeparator>-</localeSeparator>
+ <useRelativeImageUris>true</useRelativeImageUris>
+ </options>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/jmx/pom.xml
===================================================================
--- core/branches/Branch_3_3/jmx/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/jmx/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,37 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-jmx</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate JMX Module</name>
- <description>Defines Hibernate JMX capabilities</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <!-- logging setup for the test suite -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/jmx/pom.xml (from rev 15183, core/branches/Branch_3_3/jmx/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/jmx/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/jmx/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,37 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jmx</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate JMX Module</name>
+ <description>Defines Hibernate JMX capabilities</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <!-- logging setup for the test suite -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/parent/pom.xml
===================================================================
--- core/branches/Branch_3_3/parent/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/parent/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,333 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ Hibernate, Relational Persistence for Idiomatic Java
- ~
- ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- ~ indicated by the @author tags or express copyright attribution
- ~ statements applied by the authors. All third-party contributions are
- ~ distributed under license by Red Hat Middleware LLC.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, as published by the Free Software Foundation.
- ~
- ~ This program is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- ~ for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public License
- ~ along with this distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <packaging>pom</packaging>
- <version>3.3.0-SNAPSHOT</version>
-
- <name>Hibernate Core Parent POM</name>
- <description>The base POM for all Hibernate Core modules.</description>
- <url>http://hibernate.org</url>
-
- <organization>
- <name>Hibernate.org</name>
- <url>http://hibernate.org</url>
- </organization>
-
- <licenses>
- <license>
- <name>GNU Lesser General Public License</name>
- <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
- <comments>See discussion at http://hibernate.org/356.html for more details.</comments>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <scm>
- <connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</developerConnection>
- <url>https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</url>
- </scm>
-
- <ciManagement>
- <system>hudson</system>
- <url>http://hudson.jboss.org/hudson/job/hibernate-testsuite/</url>
- <notifiers>
- <notifier>
- <type>mail</type>
- <address>hibernate-dev(a)lists.jboss.org</address>
- </notifier>
- </notifiers>
- </ciManagement>
-
- <issueManagement>
- <system>jira</system>
- <url>http://opensource.atlassian.com/projects/hibernate/browse/HHH</url>
- </issueManagement>
-
- <mailingLists>
- <mailingList>
- <name>Hibernate Announcements</name>
- <post>hibernate-announce(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
- </mailingList>
- <mailingList>
- <name>Hibernate Commit Notificatons</name>
- <post>hibernate-commits(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/hibernate-commits/</archive>
- </mailingList>
- <mailingList>
- <name>Hibernate Developers</name>
- <post>hibernate-dev(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
- <otherArchives>
- <otherArchive>http://www.mail-archive.com/hibernate-dev%40lists.jboss.org/index.html</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>Hibernate Issue Notifications</name>
- <post>hibernate-issues(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/hibernate-issues/</archive>
- </mailingList>
- </mailingLists>
-
- <build>
- <plugins>
- <plugin>
- <!-- require at least JDK 1.5 to run the build -->
- <!-- ... -->
- <!-- we need at least Maven 2.0.8 because of a bug fix affecting our antlr usage -->
- <!-- 2.0.8 not released at this time, so I instead say anything greater that 2.0.7 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>enforce-java</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireJavaVersion>
- <version>[1.5,)</version>
- </requireJavaVersion>
- <requireMavenVersion>
- <version>(2.0.7,)</version>
- </requireMavenVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- by default, compile to JDK 1.4 compatibility (individual modules and/or user can override) -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <!-- add specification/implementation details to the manifests -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- <manifestEntries>
- <Implementation-URL>${pom.url}</Implementation-URL>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- </configuration>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.4</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-alpha-3</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- </plugin>
- </plugins>
- </pluginManagement>
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav</artifactId>
- <version>1.0-beta-2</version>
- </extension>
- </extensions>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.4.3</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <links>
- <link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
- <link>http://java.sun.com/j2ee/1.4/docs/api/</link>
- </links>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.1</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <linkXref>true</linkXref>
- <minimumTokens>100</minimumTokens>
- <targetJdk>1.4</targetJdk>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>taglist-maven-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <tags>
- <tag>@FIXME</tag>
- <tag>@fixme</tag>
- <tag>FIXME</tag>
- <tag>fixme</tag>
- <tag>@TODO</tag>
- <tag>@todo</tag>
- <tag>TODO</tag>
- <tag>todo</tag>
- </tags>
- </configuration>
- </plugin>
- <plugin>
- <!-- Note: aggregate-able, may cause problems if we aggregate jxr and not this because of the xref links -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>javancss-maven-plugin</artifactId>
- <version>2.0-beta-2</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <version>1.1.1</version>
- <configuration>
- <onlyAnalyze>org.hibernate.*</onlyAnalyze>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
-
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>antlr</groupId>
- <artifactId>antlr</artifactId>
- <version>2.7.6</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- </dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <distributionManagement>
- <repository>
- <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
- <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
- <!-- todo : replace this with direct svn access once the svnkit providers are available -->
- <id>repository.jboss.org</id>
- <url>file://${maven.repository.root}</url>
- </repository>
- <snapshotRepository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshot Repository</name>
- <url>dav:https://snapshots.jboss.org/maven2</url>
- </snapshotRepository>
- </distributionManagement>
-
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/parent/pom.xml (from rev 15183, core/branches/Branch_3_3/parent/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/parent/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/parent/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <packaging>pom</packaging>
+ <version>3.3.1.GA</version>
+
+ <name>Hibernate Core Parent POM</name>
+ <description>The base POM for all Hibernate Core modules.</description>
+ <url>http://hibernate.org</url>
+
+ <organization>
+ <name>Hibernate.org</name>
+ <url>http://hibernate.org</url>
+ </organization>
+
+ <licenses>
+ <license>
+ <name>GNU Lesser General Public License</name>
+ <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
+ <comments>See discussion at http://hibernate.org/356.html for more details.</comments>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</developerConnection>
+ <url>https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</url>
+ </scm>
+
+ <ciManagement>
+ <system>hudson</system>
+ <url>http://hudson.jboss.org/hudson/job/hibernate-testsuite/</url>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <address>hibernate-dev(a)lists.jboss.org</address>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>http://opensource.atlassian.com/projects/hibernate/browse/HHH</url>
+ </issueManagement>
+
+ <mailingLists>
+ <mailingList>
+ <name>Hibernate Announcements</name>
+ <post>hibernate-announce(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Commit Notificatons</name>
+ <post>hibernate-commits(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-commits/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Developers</name>
+ <post>hibernate-dev(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/hibernate-dev%40lists.jboss.org/index.html</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Issue Notifications</name>
+ <post>hibernate-issues(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-issues/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!-- require at least JDK 1.5 to run the build -->
+ <!-- ... -->
+ <!-- we need at least Maven 2.0.8 because of a bug fix affecting our antlr usage -->
+ <!-- 2.0.8 not released at this time, so I instead say anything greater that 2.0.7 -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-java</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireJavaVersion>
+ <version>[1.5,)</version>
+ </requireJavaVersion>
+ <requireMavenVersion>
+ <version>(2.0.7,)</version>
+ </requireMavenVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- by default, compile to JDK 1.4 compatibility (individual modules and/or user can override) -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <!-- add specification/implementation details to the manifests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-URL>${pom.url}</Implementation-URL>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-alpha-3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.4.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <links>
+ <link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
+ <link>http://java.sun.com/j2ee/1.4/docs/api/</link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <linkXref>true</linkXref>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.4</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <tags>
+ <tag>@FIXME</tag>
+ <tag>@fixme</tag>
+ <tag>FIXME</tag>
+ <tag>fixme</tag>
+ <tag>@TODO</tag>
+ <tag>@todo</tag>
+ <tag>TODO</tag>
+ <tag>todo</tag>
+ </tags>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- Note: aggregate-able, may cause problems if we aggregate jxr and not this because of the xref links -->
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javancss-maven-plugin</artifactId>
+ <version>2.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>1.1.1</version>
+ <configuration>
+ <onlyAnalyze>org.hibernate.*</onlyAnalyze>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <!-- test-scoped dependencies for common testing dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>1.5.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>99.0-does-not-exist</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>99.0-does-not-exist</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- / test-scoped dependencies for common testing dependencies -->
+ </dependencies>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>2.7.6</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+</project>
Deleted: core/tags/hibernate-3.3.1.GA/pom.xml
===================================================================
--- core/branches/Branch_3_3/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,96 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- ~ Hibernate, Relational Persistence for Idiomatic Java
- ~
- ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- ~ indicated by the @author tags or express copyright attribution
- ~ statements applied by the authors. All third-party contributions are
- ~ distributed under license by Red Hat Middleware LLC.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, as published by the Free Software Foundation.
- ~
- ~ This program is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- ~ for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public License
- ~ along with this distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <packaging>pom</packaging>
-
- <name>Hibernate Core Aggregator</name>
- <description>Aggregator of the Hibernate Core modules.</description>
-
- <modules>
- <module>parent</module>
- <module>core</module>
- <module>cache-ehcache</module>
- <module>cache-jbosscache</module>
- <module>cache-jbosscache2</module>
- <module>cache-oscache</module>
- <module>cache-swarmcache</module>
- <module>connection-c3p0</module>
- <module>connection-proxool</module>
- <module>jmx</module>
- <module>testing</module>
- <module>testsuite</module>
- <module>tutorials</module>
-<!--
- Need to scope bytecode providers first...
- <module>bytecode-cglib</module>
- <module>bytecode-javassist</module>
--->
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.0-beta-7</version>
- <configuration>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>docs</id>
- <activation>
- <property>
- <name>disableDistribution</name>
- <value>!true</value>
- </property>
- </activation>
- <modules>
- <module>documentation</module>
- <module>distribution</module>
- </modules>
- </profile>
- </profiles>
-
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/pom.xml (from rev 15183, core/branches/Branch_3_3/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Hibernate Core Aggregator</name>
+ <description>Aggregator of the Hibernate Core modules.</description>
+
+ <modules>
+ <module>parent</module>
+ <module>core</module>
+ <module>cache-ehcache</module>
+ <module>cache-jbosscache</module>
+ <module>cache-jbosscache2</module>
+ <module>cache-oscache</module>
+ <module>cache-swarmcache</module>
+ <module>connection-c3p0</module>
+ <module>connection-proxool</module>
+ <module>jmx</module>
+ <module>testing</module>
+ <module>testsuite</module>
+ <module>tutorials</module>
+<!--
+ Need to scope bytecode providers first...
+ <module>bytecode-cglib</module>
+ <module>bytecode-javassist</module>
+-->
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-7</version>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>docs</id>
+ <activation>
+ <property>
+ <name>disableDistribution</name>
+ <value>!true</value>
+ </property>
+ </activation>
+ <modules>
+ <module>documentation</module>
+ <module>distribution</module>
+ </modules>
+ </profile>
+ </profiles>
+
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/testing/pom.xml
===================================================================
--- core/branches/Branch_3_3/testing/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/testing/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,45 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-testing</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate Testing</name>
- <description>Hibernate JUnit test utilities</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <!-- here we need to pull JUnit deps into compile scope, as opposed to the normal test scope -->
- <version>3.8.1</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <filtering>false</filtering>
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.hbm.xml</include>
- </includes>
- </resource>
- </resources>
- </build>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/testing/pom.xml (from rev 15183, core/branches/Branch_3_3/testing/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/testing/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/testing/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,45 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate Testing</name>
+ <description>Hibernate JUnit test utilities</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <!-- here we need to pull JUnit deps into compile scope, as opposed to the normal test scope -->
+ <version>3.8.1</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.hbm.xml</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/testing/src/main/java/org/hibernate/junit/UnitTestCase.java
===================================================================
--- core/branches/Branch_3_3/testing/src/main/java/org/hibernate/junit/UnitTestCase.java 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/testing/src/main/java/org/hibernate/junit/UnitTestCase.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,152 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.junit;
-
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import junit.framework.AssertionFailedError;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-
-/**
- * A basic JUnit {@link junit.framework.TestCase} subclass for
- * adding some Hibernate specific behavior and functionality.
- *
- * @author Steve Ebersole
- */
-public abstract class UnitTestCase extends junit.framework.TestCase {
-
- private static final Logger log = LoggerFactory.getLogger( UnitTestCase.class );
-
- public UnitTestCase(String string) {
- super( string );
- }
-
- /**
- * runBare overridden in order to apply FailureExpected validations
- * as well as start/complete logging
- *
- * @throws Throwable
- */
- public void runBare() throws Throwable {
- final boolean doValidate = getName().endsWith( "FailureExpected" ) && Boolean.getBoolean( "hibernate.test.validatefailureexpected" );
- try {
- log.info( "Starting test [" + fullTestName() + "]" );
- super.runBare();
- if ( doValidate ) {
- fail( "Test marked as FailureExpected, but did not fail!" );
- }
- }
- catch( Throwable t ) {
- if ( doValidate ) {
- skipExpectedFailure( t );
- }
- else {
- throw t;
- }
- }
- finally {
- log.info( "Completed test [" + fullTestName() + "]" );
- }
- }
-
- protected void skipExpectedFailure(Throwable error) {
- reportSkip( "ignoring *FailuredExpected methods", "Failed with: " + error.toString() );
- }
-
- // additional assertions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- public static void assertElementTypeAssignability(java.util.Collection collection, Class clazz) throws AssertionFailedError {
- Iterator itr = collection.iterator();
- while ( itr.hasNext() ) {
- assertClassAssignability( itr.next().getClass(), clazz );
- }
- }
-
- public static void assertClassAssignability(Class source, Class target) throws AssertionFailedError {
- if ( !target.isAssignableFrom( source ) ) {
- throw new AssertionFailedError(
- "Classes were not assignment-compatible : source<" + source.getName() +
- "> target<" + target.getName() + ">"
- );
- }
- }
-
-
- // test skipping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- public String fullTestName() {
- return this.getClass().getName() + "#" + this.getName();
- }
-
- protected void reportSkip(String reason, String testDescription) {
- SkipLog.LOG.warn( "*** skipping [" + fullTestName() + "] - " + testDescription + " : " + reason, new Exception() );
- }
-
- // testsuite utitities ---------------------------------------------------
-
- /**
- * Supports easy creation of TestSuites where a subclass' "FailureExpected"
- * version of a base test is included in the suite, while the base test
- * is excluded. E.g. test class FooTestCase includes method testBar(), while test
- * class SubFooTestCase extends FooTestCase includes method testBarFailureExcluded().
- * Passing SubFooTestCase.class to this method will return a suite that
- * does not include testBar().
- */
- public static TestSuite createFailureExpectedSuite(Class testClass) {
-
- TestSuite allTests = new TestSuite(testClass);
- Set failureExpected = new HashSet();
- Enumeration tests = allTests.tests();
- while (tests.hasMoreElements()) {
- Test t = (Test) tests.nextElement();
- if (t instanceof TestCase) {
- String name = ((TestCase) t).getName();
- if (name.endsWith("FailureExpected"))
- failureExpected.add(name);
- }
- }
-
- TestSuite result = new TestSuite();
- tests = allTests.tests();
- while (tests.hasMoreElements()) {
- Test t = (Test) tests.nextElement();
- if (t instanceof TestCase) {
- String name = ((TestCase) t).getName();
- if (!failureExpected.contains(name + "FailureExpected")) {
- result.addTest(t);
- }
- }
- }
-
- return result;
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/testing/src/main/java/org/hibernate/junit/UnitTestCase.java (from rev 15107, core/branches/Branch_3_3/testing/src/main/java/org/hibernate/junit/UnitTestCase.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/testing/src/main/java/org/hibernate/junit/UnitTestCase.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/testing/src/main/java/org/hibernate/junit/UnitTestCase.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,161 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2007, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.junit;
+
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+
+/**
+ * A basic JUnit {@link junit.framework.TestCase} subclass for
+ * adding some Hibernate specific behavior and functionality.
+ *
+ * @author Steve Ebersole
+ */
+public abstract class UnitTestCase extends junit.framework.TestCase {
+
+ private static final Logger log = LoggerFactory.getLogger( UnitTestCase.class );
+
+ public UnitTestCase(String string) {
+ super( string );
+ }
+
+ /**
+ * runBare overridden in order to apply FailureExpected validations
+ * as well as start/complete logging
+ *
+ * @throws Throwable
+ */
+ public void runBare() throws Throwable {
+ final boolean doValidate = getName().endsWith( "FailureExpected" ) && Boolean.getBoolean( "hibernate.test.validatefailureexpected" );
+ try {
+ log.info( "Starting test [" + fullTestName() + "]" );
+ super.runBare();
+ if ( doValidate ) {
+ throw new FailureExpectedTestPassedException();
+ }
+ }
+ catch ( FailureExpectedTestPassedException t ) {
+ throw t;
+ }
+ catch( Throwable t ) {
+ if ( doValidate ) {
+ skipExpectedFailure( t );
+ }
+ else {
+ throw t;
+ }
+ }
+ finally {
+ log.info( "Completed test [" + fullTestName() + "]" );
+ }
+ }
+
+ private static class FailureExpectedTestPassedException extends Exception {
+ public FailureExpectedTestPassedException() {
+ super( "Test marked as FailureExpected, but did not fail!" );
+ }
+ }
+
+ protected void skipExpectedFailure(Throwable error) {
+ reportSkip( "ignoring *FailuredExpected methods", "Failed with: " + error.toString() );
+ }
+
+ // additional assertions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ public static void assertElementTypeAssignability(java.util.Collection collection, Class clazz) throws AssertionFailedError {
+ Iterator itr = collection.iterator();
+ while ( itr.hasNext() ) {
+ assertClassAssignability( itr.next().getClass(), clazz );
+ }
+ }
+
+ public static void assertClassAssignability(Class source, Class target) throws AssertionFailedError {
+ if ( !target.isAssignableFrom( source ) ) {
+ throw new AssertionFailedError(
+ "Classes were not assignment-compatible : source<" + source.getName() +
+ "> target<" + target.getName() + ">"
+ );
+ }
+ }
+
+
+ // test skipping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ public String fullTestName() {
+ return this.getClass().getName() + "#" + this.getName();
+ }
+
+ protected void reportSkip(String reason, String testDescription) {
+ SkipLog.LOG.warn( "*** skipping [" + fullTestName() + "] - " + testDescription + " : " + reason, new Exception() );
+ }
+
+ // testsuite utitities ---------------------------------------------------
+
+ /**
+ * Supports easy creation of TestSuites where a subclass' "FailureExpected"
+ * version of a base test is included in the suite, while the base test
+ * is excluded. E.g. test class FooTestCase includes method testBar(), while test
+ * class SubFooTestCase extends FooTestCase includes method testBarFailureExcluded().
+ * Passing SubFooTestCase.class to this method will return a suite that
+ * does not include testBar().
+ */
+ public static TestSuite createFailureExpectedSuite(Class testClass) {
+
+ TestSuite allTests = new TestSuite(testClass);
+ Set failureExpected = new HashSet();
+ Enumeration tests = allTests.tests();
+ while (tests.hasMoreElements()) {
+ Test t = (Test) tests.nextElement();
+ if (t instanceof TestCase) {
+ String name = ((TestCase) t).getName();
+ if (name.endsWith("FailureExpected"))
+ failureExpected.add(name);
+ }
+ }
+
+ TestSuite result = new TestSuite();
+ tests = allTests.tests();
+ while (tests.hasMoreElements()) {
+ Test t = (Test) tests.nextElement();
+ if (t instanceof TestCase) {
+ String name = ((TestCase) t).getName();
+ if (!failureExpected.contains(name + "FailureExpected")) {
+ result.addTest(t);
+ }
+ }
+ }
+
+ return result;
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/testsuite/pom.xml
===================================================================
--- core/branches/Branch_3_3/testsuite/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/testsuite/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,353 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-testsuite</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate Testsuite</name>
- <description>The testsuite of Hibernate functionality</description>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-testing</artifactId>
- <version>${version}</version>
- </dependency>
- <!-- these are optional on core... :( -->
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.GA</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-cglib-repack</artifactId>
- <version>2.1_3</version>
- </dependency>
- <!-- optional dom4j dependency; needed here for dom4j (de)serialization -->
- <dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <version>1.1</version>
- </dependency>
- <!-- logging setup for the test suite -->
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
-
- <build>
- <testResources>
- <testResource>
- <filtering>false</filtering>
- <directory>src/test/java</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </testResource>
- <testResource>
- <filtering>true</filtering>
- <directory>src/test/resources</directory>
- </testResource>
- </testResources>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-test-ext-plugin</artifactId>
- <version>1.1.0</version>
- <executions>
- <execution>
- <goals>
- <goal>extend</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>hibernate.test.validatefailureexpected</name>
- <value>true</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <!-- HSQLDB is the default (eventually move to H2) -->
- <profile>
- <id>hsqldb</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <dependencies>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.HSQLDialect</db.dialect>
- <jdbc.driver>org.hsqldb.jdbcDriver</jdbc.driver>
- <jdbc.url>jdbc:hsqldb:target/test/db/hsqldb/hibernate</jdbc.url>
- <jdbc.user>sa</jdbc.user>
- <jdbc.pass />
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The H2 test envionment -->
- <profile>
- <id>h2</id>
- <dependencies>
- <dependency>
- <groupId>org.h2database</groupId>
- <artifactId>h2database</artifactId>
- <version>1.0.20061217</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
- <jdbc.driver>org.h2.Driver</jdbc.driver>
- <jdbc.url>jdbc:h2:mem:target/test/db/h2/hibernate</jdbc.url>
- <jdbc.user>sa</jdbc.user>
- <jdbc.pass />
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!--
- ###################################################################
- Profiles naming db instances in the Red Hat QA/QE lab
-
- First, those with OSS drivers
- ###################################################################
- -->
-
- <!-- The MySQL5 test envionment -->
- <profile>
- <id>mysql5</id>
- <dependencies>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.0.5</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
- <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
- <jdbc.url>jdbc:mysql://dev02.qa.atl.jboss.com/cruisecontrol</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The PostgreSQL test envionment -->
- <profile>
- <id>pgsql8</id>
- <dependencies>
- <dependency>
- <groupId>postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>8.2-504</version>
- <classifier>jdbc3</classifier>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.PostgreSQLDialect</db.dialect>
- <jdbc.driver>org.postgresql.Driver</jdbc.driver>
- <jdbc.url>jdbc:postgresql://dev01.qa.atl.jboss.com:5432:cruisecontrol</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!--
- ###################################################################
- Then, those with commercial drivers
- ###################################################################
- -->
-
- <!-- The Oracle9i test envionment -->
- <profile>
- <id>oracle9i</id>
- <dependencies>
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc14</artifactId>
- <!-- use the 10g drivers which are surprisingly largely bug free -->
- <version>10.0.2.0</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.Oracle9iDialect</db.dialect>
- <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
- <jdbc.url>jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The Oracle10g test envionment -->
- <profile>
- <id>oracle10g</id>
- <dependencies>
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc14</artifactId>
- <!-- use the 10g drivers which are surprisingly largely bug free -->
- <version>10.0.2.0</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
- <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
- <jdbc.url>jdbc:oracle:thin:@dev01.qa.atl.jboss.com:1521:qadb01</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The DB2 8.x test envionment (using 9x drivers)-->
- <profile>
- <id>db2-8</id>
- <dependencies>
- <dependency>
- <groupId>com.ibm</groupId>
- <artifactId>db2jcc</artifactId>
- <version>3.1.57</version>
- </dependency>
- <dependency>
- <groupId>com.ibm</groupId>
- <artifactId>db2jcc_license_cu</artifactId>
- <version>3.1.57</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.DB2Dialect</db.dialect>
- <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
- <jdbc.url>jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
- <jdbc.user>hiber</jdbc.user>
- <jdbc.pass>hiber</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The Sybase 12 test envionment -->
- <profile>
- <id>sybase12</id>
- <dependencies>
- <dependency>
- <groupId>com.sybase</groupId>
- <artifactId>jconnect</artifactId>
- <version>6.0.5</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.SybaseDialect</db.dialect>
- <jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
- <jdbc.url>jdbc:sybase:Tds:dev01.qa.atl.jboss.com:4100/cruisecontrol</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The SQLServer2005 (jTDS) test envionment -->
- <profile>
- <id>sqlserver-jtds</id>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.jtds</groupId>
- <artifactId>jtds</artifactId>
- <version>1.2</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
- <jdbc.driver>net.sourceforge.jtds.jdbc.Driver</jdbc.driver>
- <jdbc.url>jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/cruisecontrol</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The SQLServer2005 (MS JDBC) test envionment -->
- <profile>
- <id>sqlserver-msjdbc</id>
- <dependencies>
- <dependency>
- <groupId>com.microsoft.sqlserver</groupId>
- <artifactId>msjdbc</artifactId>
- <version>1.1</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
- <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
- <jdbc.url>jdbc:sqlserver://dev30.qa.atl.jboss.com:3918</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation>4096</jdbc.isolation>
- </properties>
- </profile>
-
- </profiles>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/testsuite/pom.xml (from rev 15183, core/branches/Branch_3_3/testsuite/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/testsuite/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/testsuite/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,327 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-testsuite</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate Testsuite</name>
+ <description>The testsuite of Hibernate functionality</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <!-- these are optional on core... :( -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-cglib-repack</artifactId>
+ <version>2.1_3</version>
+ </dependency>
+ <!-- optional dom4j dependency; needed here for dom4j (de)serialization -->
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <filtering>true</filtering>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-test-ext-plugin</artifactId>
+ <version>1.1.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>extend</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>hibernate.test.validatefailureexpected</name>
+ <value>true</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <!-- HSQLDB is the default (eventually move to H2) -->
+ <profile>
+ <id>hsqldb</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.HSQLDialect</db.dialect>
+ <jdbc.driver>org.hsqldb.jdbcDriver</jdbc.driver>
+ <jdbc.url>jdbc:hsqldb:target/test/db/hsqldb/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass />
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The H2 test envionment -->
+ <profile>
+ <id>h2</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.h2database</groupId>
+ <artifactId>h2database</artifactId>
+ <version>1.0.20061217</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
+ <jdbc.driver>org.h2.Driver</jdbc.driver>
+ <jdbc.url>jdbc:h2:mem:target/test/db/h2/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass />
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!--
+ ###################################################################
+ Profiles naming db instances in the Red Hat QA/QE lab
+
+ First, those with OSS drivers
+ ###################################################################
+ -->
+
+ <!-- The MySQL5 test envionment -->
+ <profile>
+ <id>mysql5</id>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.0.5</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
+ <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:mysql://dev02.qa.atl.jboss.com/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The PostgreSQL test envionment -->
+ <profile>
+ <id>pgsql8</id>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.2-504</version>
+ <classifier>jdbc3</classifier>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.PostgreSQLDialect</db.dialect>
+ <jdbc.driver>org.postgresql.Driver</jdbc.driver>
+ <jdbc.url>jdbc:postgresql://dev01.qa.atl.jboss.com:5432:cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!--
+ ###################################################################
+ Then, those with commercial drivers
+ ###################################################################
+ -->
+
+ <!-- The Oracle9i test envionment -->
+ <profile>
+ <id>oracle9i</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle9iDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The Oracle10g test envionment -->
+ <profile>
+ <id>oracle10g</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev01.qa.atl.jboss.com:1521:qadb01</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The DB2 8.x test envionment (using 9x drivers)-->
+ <profile>
+ <id>db2-8</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc</artifactId>
+ <version>3.1.57</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc_license_cu</artifactId>
+ <version>3.1.57</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.DB2Dialect</db.dialect>
+ <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
+ <jdbc.url>jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
+ <jdbc.user>hiber</jdbc.user>
+ <jdbc.pass>hiber</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The Sybase 12 test envionment -->
+ <profile>
+ <id>sybase12</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.sybase</groupId>
+ <artifactId>jconnect</artifactId>
+ <version>6.0.5</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SybaseDialect</db.dialect>
+ <jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
+ <jdbc.url>jdbc:sybase:Tds:dev01.qa.atl.jboss.com:4100/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The SQLServer2005 (jTDS) test envionment -->
+ <profile>
+ <id>sqlserver-jtds</id>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.jtds</groupId>
+ <artifactId>jtds</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>net.sourceforge.jtds.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The SQLServer2005 (MS JDBC) test envionment -->
+ <profile>
+ <id>sqlserver-msjdbc</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>msjdbc</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
+ <jdbc.url>jdbc:sqlserver://dev30.qa.atl.jboss.com:3918</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation>4096</jdbc.isolation>
+ </properties>
+ </profile>
+
+ </profiles>
+</project>
Deleted: core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,192 +0,0 @@
-//$Id: ExtendsTest.java 10977 2006-12-12 23:28:04Z steve.ebersole(a)jboss.com $
-package org.hibernate.test.extendshbm;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.hibernate.HibernateException;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.junit.UnitTestCase;
-
-/**
- * @author Gavin King
- */
-public class ExtendsTest extends UnitTestCase {
-
- public ExtendsTest(String str) {
- super( str );
- }
-
- public static Test suite() {
- return new TestSuite( ExtendsTest.class );
- }
-
- private String getBaseForMappings() {
- return "org/hibernate/test/";
- }
-
- public void testAllInOne() {
- Configuration cfg = new Configuration();
-
- cfg.addResource( getBaseForMappings() + "extendshbm/allinone.hbm.xml" );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" ) );
- }
-
- public void testOutOfOrder() {
- Configuration cfg = new Configuration();
-
- try {
- cfg.addResource( getBaseForMappings() + "extendshbm/Customer.hbm.xml" );
- assertNull(
- "cannot be in the configuration yet!",
- cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" )
- );
- cfg.addResource( getBaseForMappings() + "extendshbm/Person.hbm.xml" );
- cfg.addResource( getBaseForMappings() + "extendshbm/Employee.hbm.xml" );
-
- cfg.buildSessionFactory();
-
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" ) );
-
- }
- catch ( HibernateException e ) {
- fail( "should not fail with exception! " + e );
- }
-
- }
-
- public void testNwaitingForSuper() {
- Configuration cfg = new Configuration();
-
- try {
- cfg.addResource( getBaseForMappings() + "extendshbm/Customer.hbm.xml" );
- assertNull(
- "cannot be in the configuration yet!",
- cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" )
- );
- cfg.addResource( getBaseForMappings() + "extendshbm/Employee.hbm.xml" );
- assertNull(
- "cannot be in the configuration yet!",
- cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" )
- );
- cfg.addResource( getBaseForMappings() + "extendshbm/Person.hbm.xml" );
-
- cfg.buildMappings();
-
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
-
-
- }
- catch ( HibernateException e ) {
- e.printStackTrace();
- fail( "should not fail with exception! " + e );
-
- }
-
- }
-
- public void testMissingSuper() {
- Configuration cfg = new Configuration();
-
- try {
- cfg.addResource( getBaseForMappings() + "extendshbm/Customer.hbm.xml" );
- assertNull(
- "cannot be in the configuration yet!",
- cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" )
- );
- cfg.addResource( getBaseForMappings() + "extendshbm/Employee.hbm.xml" );
-
- cfg.buildSessionFactory();
-
- fail( "Should not be able to build sessionfactory without a Person" );
- }
- catch ( HibernateException e ) {
-
- }
-
- }
-
- public void testAllSeparateInOne() {
- Configuration cfg = new Configuration();
-
- try {
- cfg.addResource( getBaseForMappings() + "extendshbm/allseparateinone.hbm.xml" );
-
- cfg.buildSessionFactory();
-
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" ) );
-
- }
- catch ( HibernateException e ) {
- fail( "should not fail with exception! " + e );
- }
-
- }
-
- public void testJoinedSubclassAndEntityNamesOnly() {
- Configuration cfg = new Configuration();
-
- try {
- cfg.addResource( getBaseForMappings() + "extendshbm/entitynames.hbm.xml" );
-
- cfg.buildMappings();
-
- assertNotNull( cfg.getClassMapping( "EntityHasName" ) );
- assertNotNull( cfg.getClassMapping( "EntityCompany" ) );
-
- }
- catch ( HibernateException e ) {
- e.printStackTrace();
- fail( "should not fail with exception! " + e );
-
- }
- }
-
- public void testEntityNamesWithPackageFailureExpected() {
- Configuration cfg = new Configuration();
- try {
- cfg.addResource( getBaseForMappings() + "extendshbm/packageentitynames.hbm.xml" );
-
- cfg.buildMappings();
-
- assertNotNull( cfg.getClassMapping( "EntityHasName" ) );
- assertNotNull( cfg.getClassMapping( "EntityCompany" ) );
-
- }
- catch ( HibernateException e ) {
- e.printStackTrace();
- fail( "should not fail with exception! " + e );
-
- }
- }
-
-
- public void testUnionSubclass() {
- Configuration cfg = new Configuration();
-
- try {
- cfg.addResource( getBaseForMappings() + "extendshbm/unionsubclass.hbm.xml" );
-
- cfg.buildMappings();
-
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
- assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
-
- }
- catch ( HibernateException e ) {
- e.printStackTrace();
- fail( "should not fail with exception! " + e );
-
- }
- }
-
-}
-
Copied: core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java (from rev 15117, core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/extendshbm/ExtendsTest.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,192 @@
+//$Id: ExtendsTest.java 10977 2006-12-12 23:28:04Z steve.ebersole(a)jboss.com $
+package org.hibernate.test.extendshbm;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.hibernate.HibernateException;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.junit.UnitTestCase;
+
+/**
+ * @author Gavin King
+ */
+public class ExtendsTest extends UnitTestCase {
+
+ public ExtendsTest(String str) {
+ super( str );
+ }
+
+ public static Test suite() {
+ return new TestSuite( ExtendsTest.class );
+ }
+
+ private String getBaseForMappings() {
+ return "org/hibernate/test/";
+ }
+
+ public void testAllInOne() {
+ Configuration cfg = new Configuration();
+
+ cfg.addResource( getBaseForMappings() + "extendshbm/allinone.hbm.xml" );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" ) );
+ }
+
+ public void testOutOfOrder() {
+ Configuration cfg = new Configuration();
+
+ try {
+ cfg.addResource( getBaseForMappings() + "extendshbm/Customer.hbm.xml" );
+ assertNull(
+ "cannot be in the configuration yet!",
+ cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" )
+ );
+ cfg.addResource( getBaseForMappings() + "extendshbm/Person.hbm.xml" );
+ cfg.addResource( getBaseForMappings() + "extendshbm/Employee.hbm.xml" );
+
+ cfg.buildSessionFactory();
+
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" ) );
+
+ }
+ catch ( HibernateException e ) {
+ fail( "should not fail with exception! " + e );
+ }
+
+ }
+
+ public void testNwaitingForSuper() {
+ Configuration cfg = new Configuration();
+
+ try {
+ cfg.addResource( getBaseForMappings() + "extendshbm/Customer.hbm.xml" );
+ assertNull(
+ "cannot be in the configuration yet!",
+ cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" )
+ );
+ cfg.addResource( getBaseForMappings() + "extendshbm/Employee.hbm.xml" );
+ assertNull(
+ "cannot be in the configuration yet!",
+ cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" )
+ );
+ cfg.addResource( getBaseForMappings() + "extendshbm/Person.hbm.xml" );
+
+ cfg.buildMappings();
+
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
+
+
+ }
+ catch ( HibernateException e ) {
+ e.printStackTrace();
+ fail( "should not fail with exception! " + e );
+
+ }
+
+ }
+
+ public void testMissingSuper() {
+ Configuration cfg = new Configuration();
+
+ try {
+ cfg.addResource( getBaseForMappings() + "extendshbm/Customer.hbm.xml" );
+ assertNull(
+ "cannot be in the configuration yet!",
+ cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" )
+ );
+ cfg.addResource( getBaseForMappings() + "extendshbm/Employee.hbm.xml" );
+
+ cfg.buildSessionFactory();
+
+ fail( "Should not be able to build sessionfactory without a Person" );
+ }
+ catch ( HibernateException e ) {
+
+ }
+
+ }
+
+ public void testAllSeparateInOne() {
+ Configuration cfg = new Configuration();
+
+ try {
+ cfg.addResource( getBaseForMappings() + "extendshbm/allseparateinone.hbm.xml" );
+
+ cfg.buildSessionFactory();
+
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Employee" ) );
+
+ }
+ catch ( HibernateException e ) {
+ fail( "should not fail with exception! " + e );
+ }
+
+ }
+
+ public void testJoinedSubclassAndEntityNamesOnly() {
+ Configuration cfg = new Configuration();
+
+ try {
+ cfg.addResource( getBaseForMappings() + "extendshbm/entitynames.hbm.xml" );
+
+ cfg.buildMappings();
+
+ assertNotNull( cfg.getClassMapping( "EntityHasName" ) );
+ assertNotNull( cfg.getClassMapping( "EntityCompany" ) );
+
+ }
+ catch ( HibernateException e ) {
+ e.printStackTrace();
+ fail( "should not fail with exception! " + e );
+
+ }
+ }
+
+ public void testEntityNamesWithPackage() {
+ Configuration cfg = new Configuration();
+ try {
+ cfg.addResource( getBaseForMappings() + "extendshbm/packageentitynames.hbm.xml" );
+
+ cfg.buildMappings();
+
+ assertNotNull( cfg.getClassMapping( "EntityHasName" ) );
+ assertNotNull( cfg.getClassMapping( "EntityCompany" ) );
+
+ }
+ catch ( HibernateException e ) {
+ e.printStackTrace();
+ fail( "should not fail with exception! " + e );
+
+ }
+ }
+
+
+ public void testUnionSubclass() {
+ Configuration cfg = new Configuration();
+
+ try {
+ cfg.addResource( getBaseForMappings() + "extendshbm/unionsubclass.hbm.xml" );
+
+ cfg.buildMappings();
+
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Person" ) );
+ assertNotNull( cfg.getClassMapping( "org.hibernate.test.extendshbm.Customer" ) );
+
+ }
+ catch ( HibernateException e ) {
+ e.printStackTrace();
+ fail( "should not fail with exception! " + e );
+
+ }
+ }
+
+}
+
Deleted: core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,1952 +0,0 @@
-// $Id: ASTParserLoadingTest.java 11373 2007-03-29 19:09:07Z steve.ebersole(a)jboss.com $
-package org.hibernate.test.hql;
-
-import java.math.BigDecimal;
-import java.sql.Date;
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.hibernate.Hibernate;
-import org.hibernate.HibernateException;
-import org.hibernate.Query;
-import org.hibernate.QueryException;
-import org.hibernate.ScrollableResults;
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.hibernate.TypeMismatchException;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.cfg.Environment;
-import org.hibernate.dialect.DB2Dialect;
-import org.hibernate.dialect.HSQLDialect;
-import org.hibernate.dialect.MySQLDialect;
-import org.hibernate.dialect.Oracle9Dialect;
-import org.hibernate.dialect.PostgreSQLDialect;
-import org.hibernate.dialect.SQLServerDialect;
-import org.hibernate.dialect.SybaseDialect;
-import org.hibernate.dialect.Oracle8iDialect;
-import org.hibernate.hql.ast.ASTQueryTranslatorFactory;
-import org.hibernate.junit.functional.FunctionalTestCase;
-import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
-import org.hibernate.stat.QueryStatistics;
-import org.hibernate.test.any.IntegerPropertyValue;
-import org.hibernate.test.any.PropertySet;
-import org.hibernate.test.any.PropertyValue;
-import org.hibernate.test.any.StringPropertyValue;
-import org.hibernate.test.cid.Customer;
-import org.hibernate.test.cid.LineItem;
-import org.hibernate.test.cid.Order;
-import org.hibernate.test.cid.Product;
-import org.hibernate.transform.DistinctRootEntityResultTransformer;
-import org.hibernate.transform.Transformers;
-import org.hibernate.type.ComponentType;
-import org.hibernate.type.ManyToOneType;
-import org.hibernate.type.Type;
-import org.hibernate.util.StringHelper;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Tests the integration of the new AST parser into the loading of query results using
- * the Hibernate persisters and loaders.
- * <p/>
- * Also used to test the syntax of the resulting sql against the underlying
- * database, specifically for functionality not supported by the classic
- * parser.
- *
- * @author Steve
- */
-public class ASTParserLoadingTest extends FunctionalTestCase {
-
- private static final Logger log = LoggerFactory.getLogger( ASTParserLoadingTest.class );
-
- private List createdAnimalIds = new ArrayList();
-
- public ASTParserLoadingTest(String name) {
- super( name );
- }
-
- public String[] getMappings() {
- return new String[] {
- "hql/Animal.hbm.xml",
- "hql/FooBarCopy.hbm.xml",
- "hql/SimpleEntityWithAssociation.hbm.xml",
- "hql/CrazyIdFieldNames.hbm.xml",
- "batchfetch/ProductLine.hbm.xml",
- "cid/Customer.hbm.xml",
- "cid/Order.hbm.xml",
- "cid/LineItem.hbm.xml",
- "cid/Product.hbm.xml",
- "any/Properties.hbm.xml",
- "legacy/Commento.hbm.xml",
- "legacy/Marelo.hbm.xml"
- };
- }
-
- public void configure(Configuration cfg) {
- super.configure( cfg );
- cfg.setProperty( Environment.USE_QUERY_CACHE, "true" );
- cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
- cfg.setProperty( Environment.QUERY_TRANSLATOR, ASTQueryTranslatorFactory.class.getName() );
- }
-
- public static Test suite() {
- return new FunctionalTestClassTestSuite( ASTParserLoadingTest.class );
- }
-
- public void testComponentNullnessChecks() {
- Session s = openSession();
- s.beginTransaction();
- Human h = new Human();
- h.setName( new Name( "Johnny", 'B', "Goode" ) );
- s.save( h );
- h = new Human();
- h.setName( new Name( "Steve", null, "Ebersole" ) );
- s.save( h );
- h = new Human();
- h.setName( new Name( "Bono", null, null ) );
- s.save( h );
- h = new Human();
- h.setName( new Name( null, null, null ) );
- s.save( h );
- s.getTransaction().commit();
- s.close();
-
- s = openSession();
- s.beginTransaction();
- List results = s.createQuery( "from Human where name is null" ).list();
- assertEquals( 1, results.size() );
- results = s.createQuery( "from Human where name is not null" ).list();
- assertEquals( 3, results.size() );
- s.createQuery( "from Human where ? is null" ).setParameter( 0, null ).list();
- s.getTransaction().commit();
- s.close();
-
- s = openSession();
- s.beginTransaction();
- s.createQuery( "delete Human" ).executeUpdate();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testInvalidCollectionDereferencesFail() {
- Session s = openSession();
- s.beginTransaction();
-
- // control group...
- s.createQuery( "from Animal a join a.offspring o where o.description = 'xyz'" ).list();
- s.createQuery( "from Animal a join a.offspring o where o.father.description = 'xyz'" ).list();
- s.createQuery( "from Animal a join a.offspring o order by o.description" ).list();
- s.createQuery( "from Animal a join a.offspring o order by o.father.description" ).list();
-
- try {
- s.createQuery( "from Animal a where a.offspring.description = 'xyz'" ).list();
- fail( "illegal collection dereference semantic did not cause failure" );
- }
- catch( QueryException qe ) {
- log.trace( "expected failure...", qe );
- }
-
- try {
- s.createQuery( "from Animal a where a.offspring.father.description = 'xyz'" ).list();
- fail( "illegal collection dereference semantic did not cause failure" );
- }
- catch( QueryException qe ) {
- log.trace( "expected failure...", qe );
- }
-
- try {
- s.createQuery( "from Animal a order by a.offspring.description" ).list();
- fail( "illegal collection dereference semantic did not cause failure" );
- }
- catch( QueryException qe ) {
- log.trace( "expected failure...", qe );
- }
-
- try {
- s.createQuery( "from Animal a order by a.offspring.father.description" ).list();
- fail( "illegal collection dereference semantic did not cause failure" );
- }
- catch( QueryException qe ) {
- log.trace( "expected failure...", qe );
- }
-
- s.getTransaction().commit();
- s.close();
- }
-
- /**
- * Copied from {@link HQLTest#testConcatenation}
- */
- public void testConcatenation() {
- // simple syntax checking...
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Human h where h.nickName = '1' || 'ov' || 'tha' || 'few'" ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- /**
- * Copied from {@link HQLTest#testExpressionWithParamInFunction}
- */
- public void testExpressionWithParamInFunction() {
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Animal a where abs(a.bodyWeight-:param) < 2.0" ).setLong( "param", 1 ).list();
- s.createQuery( "from Animal a where abs(:param - a.bodyWeight) < 2.0" ).setLong( "param", 1 ).list();
- if ( ! ( getDialect() instanceof HSQLDialect ) ) {
- // HSQLDB does not like the abs(? - ?) syntax...
- s.createQuery( "from Animal where abs(:x - :y) < 2.0" ).setLong( "x", 1 ).setLong( "y", 1 ).list();
- }
- s.createQuery( "from Animal where lower(upper(:foo)) like 'f%'" ).setString( "foo", "foo" ).list();
- s.createQuery( "from Animal a where abs(abs(a.bodyWeight - 1.0 + :param) * abs(length('ffobar')-3)) = 3.0" ).setLong( "param", 1 ).list();
- s.createQuery( "from Animal where lower(upper('foo') || upper(:bar)) like 'f%'" ).setString( "bar", "xyz" ).list();
- if ( ! ( getDialect() instanceof PostgreSQLDialect || getDialect() instanceof MySQLDialect ) ) {
- s.createQuery( "from Animal where abs(cast(1 as float) - cast(:param as float)) = 1.0" ).setLong( "param", 1 ).list();
- }
- s.getTransaction().commit();
- s.close();
- }
-
- public void testCrazyIdFieldNames() {
- MoreCrazyIdFieldNameStuffEntity top = new MoreCrazyIdFieldNameStuffEntity( "top" );
- HeresAnotherCrazyIdFieldName next = new HeresAnotherCrazyIdFieldName( "next" );
- top.setHeresAnotherCrazyIdFieldName( next );
- MoreCrazyIdFieldNameStuffEntity other = new MoreCrazyIdFieldNameStuffEntity( "other" );
- Session s = openSession();
- s.beginTransaction();
- s.save( next );
- s.save( top );
- s.save( other );
- s.flush();
-
- List results = s.createQuery( "select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e where e.heresAnotherCrazyIdFieldName is not null" ).list();
- assertEquals( 1, results.size() );
- Object result = results.get( 0 );
- assertClassAssignability( HeresAnotherCrazyIdFieldName.class, result.getClass() );
- assertSame( next, result );
-
- results = s.createQuery( "select e.heresAnotherCrazyIdFieldName.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e where e.heresAnotherCrazyIdFieldName is not null" ).list();
- assertEquals( 1, results.size() );
- result = results.get( 0 );
- assertClassAssignability( Long.class, result.getClass() );
- assertEquals( next.getHeresAnotherCrazyIdFieldName(), result );
-
- results = s.createQuery( "select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e" ).list();
- assertEquals( 1, results.size() );
- Iterator itr = s.createQuery( "select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e" ).iterate();
- assertTrue( itr.hasNext() ); itr.next(); assertFalse( itr.hasNext() );
-
- s.delete( top );
- s.delete( next );
- s.getTransaction().commit();
- s.close();
- }
-
- public void testImplicitJoinsInDifferentClauses() {
- // HHH-2257 :
- // both the classic and ast translators output the same syntactically valid sql
- // for all of these cases; the issue is that shallow (iterate) and
- // non-shallow (list/scroll) queries return different results because the
- // shallow skips the inner join which "weeds out" results from the non-shallow queries.
- // The results were initially different depending upon the clause(s) in which the
- // implicit join occurred
- Session s = openSession();
- s.beginTransaction();
- SimpleEntityWithAssociation owner = new SimpleEntityWithAssociation( "owner" );
- SimpleAssociatedEntity e1 = new SimpleAssociatedEntity( "thing one", owner );
- SimpleAssociatedEntity e2 = new SimpleAssociatedEntity( "thing two" );
- s.save( e1 );
- s.save( e2 );
- s.save( owner );
- s.getTransaction().commit();
- s.close();
-
- checkCounts( "select e.owner from SimpleAssociatedEntity e", 1, "implicit-join in select clause" );
- checkCounts( "select e.id, e.owner from SimpleAssociatedEntity e", 1, "implicit-join in select clause" );
-
- // resolved to a "id short cut" when part of the order by clause -> no inner join = no weeding out...
- checkCounts( "from SimpleAssociatedEntity e order by e.owner", 2, "implicit-join in order-by clause" );
- // resolved to a "id short cut" when part of the group by clause -> no inner join = no weeding out...
- checkCounts( "select e.owner.id, count(*) from SimpleAssociatedEntity e group by e.owner", 2, "implicit-join in select and group-by clauses" );
-
- s = openSession();
- s.beginTransaction();
- s.delete( e1 );
- s.delete( e2 );
- s.delete( owner );
- s.getTransaction().commit();
- s.close();
- }
-
- private void checkCounts(String hql, int expected, String testCondition) {
- Session s = openSession();
- s.beginTransaction();
- int count = determineCount( s.createQuery( hql ).list().iterator() );
- assertEquals( "list() [" + testCondition + "]", expected, count );
- count = determineCount( s.createQuery( hql ).iterate() );
- assertEquals( "iterate() [" + testCondition + "]", expected, count );
- s.getTransaction().commit();
- s.close();
- }
-
- public void testImplicitSelectEntityAssociationInShallowQuery() {
- // HHH-2257 :
- // both the classic and ast translators output the same syntactically valid sql.
- // the issue is that shallow and non-shallow queries return different
- // results because the shallow skips the inner join which "weeds out" results
- // from the non-shallow queries...
- Session s = openSession();
- s.beginTransaction();
- SimpleEntityWithAssociation owner = new SimpleEntityWithAssociation( "owner" );
- SimpleAssociatedEntity e1 = new SimpleAssociatedEntity( "thing one", owner );
- SimpleAssociatedEntity e2 = new SimpleAssociatedEntity( "thing two" );
- s.save( e1 );
- s.save( e2 );
- s.save( owner );
- s.getTransaction().commit();
- s.close();
-
- s = openSession();
- s.beginTransaction();
- int count = determineCount( s.createQuery( "select e.id, e.owner from SimpleAssociatedEntity e" ).list().iterator() );
- assertEquals( 1, count ); // thing two would be removed from the result due to the inner join
- count = determineCount( s.createQuery( "select e.id, e.owner from SimpleAssociatedEntity e" ).iterate() );
- assertEquals( 1, count );
- s.getTransaction().commit();
- s.close();
-
- s = openSession();
- s.beginTransaction();
- s.delete( e1 );
- s.delete( e2 );
- s.delete( owner );
- s.getTransaction().commit();
- s.close();
- }
-
- private int determineCount(Iterator iterator) {
- int count = 0;
- while( iterator.hasNext() ) {
- count++;
- iterator.next();
- }
- return count;
- }
-
- public void testNestedComponentIsNull() {
- // (1) From MapTest originally...
- // (2) Was then moved into HQLTest...
- // (3) However, a bug fix to EntityType#getIdentifierOrUniqueKeyType (HHH-2138)
- // caused the classic parser to suddenly start throwing exceptions on
- // this query, apparently relying on the buggy behavior somehow; thus
- // moved here to at least get some syntax checking...
- //
- // fyi... found and fixed the problem in the classic parser; still
- // leaving here for syntax checking
- new SyntaxChecker( "from Commento c where c.marelo.commento.mcompr is null" ).checkAll();
- }
-
- public void testSpecialClassPropertyReference() {
- // this is a long standing bug in Hibernate when applied to joined-subclasses;
- // see HHH-939 for details and history
- new SyntaxChecker( "from Zoo zoo where zoo.class = PettingZoo" ).checkAll();
- new SyntaxChecker( "select a.description from Animal a where a.class = Mammal" ).checkAll();
- new SyntaxChecker( "select a.class from Animal a" ).checkAll();
- new SyntaxChecker( "from DomesticAnimal an where an.class = Dog" ).checkAll();
- new SyntaxChecker( "from Animal an where an.class = Dog" ).checkAll();
- }
-
- public void testSpecialClassPropertyReferenceFQN() {
- // tests relating to HHH-2376
- new SyntaxChecker( "from Zoo zoo where zoo.class = org.hibernate.test.hql.PettingZoo" ).checkAll();
- new SyntaxChecker( "select a.description from Animal a where a.class = org.hibernate.test.hql.Mammal" ).checkAll();
- new SyntaxChecker( "from DomesticAnimal an where an.class = org.hibernate.test.hql.Dog" ).checkAll();
- new SyntaxChecker( "from Animal an where an.class = org.hibernate.test.hql.Dog" ).checkAll();
- }
-
- public void testSubclassOrSuperclassPropertyReferenceInJoinedSubclass() {
- // this is a long standing bug in Hibernate; see HHH-1631 for details and history
- //
- // (1) pregnant is defined as a property of the class (Mammal) itself
- // (2) description is defined as a property of the superclass (Animal)
- // (3) name is defined as a property of a particular subclass (Human)
-
- new SyntaxChecker( "from Zoo z join z.mammals as m where m.name.first = 'John'" ).checkIterate();
-
- new SyntaxChecker( "from Zoo z join z.mammals as m where m.pregnant = false" ).checkAll();
- new SyntaxChecker( "select m.pregnant from Zoo z join z.mammals as m where m.pregnant = false" ).checkAll();
-
- new SyntaxChecker( "from Zoo z join z.mammals as m where m.description = 'tabby'" ).checkAll();
- new SyntaxChecker( "select m.description from Zoo z join z.mammals as m where m.description = 'tabby'" ).checkAll();
-
- new SyntaxChecker( "from Zoo z join z.mammals as m where m.name.first = 'John'" ).checkAll();
- new SyntaxChecker( "select m.name from Zoo z join z.mammals as m where m.name.first = 'John'" ).checkAll();
-
- new SyntaxChecker( "select m.pregnant from Zoo z join z.mammals as m" ).checkAll();
- new SyntaxChecker( "select m.description from Zoo z join z.mammals as m" ).checkAll();
- new SyntaxChecker( "select m.name from Zoo z join z.mammals as m" ).checkAll();
-
- new SyntaxChecker( "from DomesticAnimal da join da.owner as o where o.nickName = 'Gavin'" ).checkAll();
- new SyntaxChecker( "select da.father from DomesticAnimal da join da.owner as o where o.nickName = 'Gavin'" ).checkAll();
- }
-
- public void testSimpleSelectWithLimitAndOffset() throws Exception {
- if ( ! ( getDialect().supportsLimit() && getDialect().supportsLimitOffset() ) ) {
- reportSkip( "dialect does not support offset and limit combo", "limit and offset combination" );
- return;
- }
-
- // just checking correctness of param binding code...
- Session session = openSession();
- session.createQuery( "from Animal" )
- .setFirstResult( 2 )
- .setMaxResults( 1 )
- .list();
- session.close();
- }
-
- public void testJPAPositionalParameterList() {
- Session s = openSession();
- s.beginTransaction();
- ArrayList params = new ArrayList();
- params.add( "Doe" );
- params.add( "Public" );
- s.createQuery( "from Human where name.last in (?1)" )
- .setParameterList( "1", params )
- .list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testComponentQueries() {
- Session s = openSession();
- s.beginTransaction();
-
- Type[] types = s.createQuery( "select h.name from Human h" ).getReturnTypes();
- assertEquals( 1, types.length );
- assertTrue( types[0] instanceof ComponentType );
-
- // Test the ability to perform comparisions between component values
- s.createQuery( "from Human h where h.name = h.name" ).list();
- s.createQuery( "from Human h where h.name = :name" ).setParameter( "name", new Name() ).list();
- s.createQuery( "from Human where name = :name" ).setParameter( "name", new Name() ).list();
- s.createQuery( "from Human h where :name = h.name" ).setParameter( "name", new Name() ).list();
- s.createQuery( "from Human h where :name <> h.name" ).setParameter( "name", new Name() ).list();
-
- // Test the ability to perform comparisions between a component and an explicit row-value
- s.createQuery( "from Human h where h.name = ('John', 'X', 'Doe')" ).list();
- s.createQuery( "from Human h where ('John', 'X', 'Doe') = h.name" ).list();
- s.createQuery( "from Human h where ('John', 'X', 'Doe') <> h.name" ).list();
- s.createQuery( "from Human h where ('John', 'X', 'Doe') >= h.name" ).list();
-
- s.createQuery( "from Human h order by h.name" ).list();
-
- s.getTransaction().commit();
- s.close();
- }
-
- public void testComponentParameterBinding() {
- // HHH-1774 : parameters are bound incorrectly with component parameters...
- Session s = openSession();
- s.beginTransaction();
-
- Order.Id oId = new Order.Id( "1234", 1 );
-
- // control
- s.createQuery("from Order o where o.customer.name =:name and o.id = :id")
- .setParameter( "name", "oracle" )
- .setParameter( "id", oId )
- .list();
-
- // this is the form that caused problems in the original case...
- s.createQuery("from Order o where o.id = :id and o.customer.name =:name ")
- .setParameter( "id", oId )
- .setParameter( "name", "oracle" )
- .list();
-
- s.getTransaction().commit();
- s.close();
- }
-
- public void testAnyMappingReference() {
- Session s = openSession();
- s.beginTransaction();
-
- PropertyValue redValue = new StringPropertyValue( "red" );
- PropertyValue lonliestNumberValue = new IntegerPropertyValue( 1 );
-
- Long id;
- PropertySet ps = new PropertySet( "my properties" );
- ps.setSomeSpecificProperty( redValue );
- ps.getGeneralProperties().put( "the lonliest number", lonliestNumberValue );
- ps.getGeneralProperties().put( "i like", new StringPropertyValue( "pina coladas" ) );
- ps.getGeneralProperties().put( "i also like", new StringPropertyValue( "getting caught in the rain" ) );
- s.save( ps );
-
- s.getTransaction().commit();
- id = ps.getId();
- s.clear();
- s.beginTransaction();
-
- // TODO : setEntity() currently will not work here, but that would be *very* nice
- // does not work because the corresponding EntityType is then used as the "bind type" rather
- // than the "discovered" AnyType...
- s.createQuery( "from PropertySet p where p.someSpecificProperty = :ssp" ).setParameter( "ssp", redValue ).list();
-
- s.createQuery( "from PropertySet p where p.someSpecificProperty.id is not null" ).list();
-
- s.createQuery( "from PropertySet p join p.generalProperties gp where gp.id is not null" ).list();
-
- s.delete( s.load( PropertySet.class, id ) );
-
- s.getTransaction().commit();
- s.close();
- }
-
- public void testJdkEnumStyleEnumConstant() throws Exception {
- Session s = openSession();
- s.beginTransaction();
-
- s.createQuery( "from Zoo z where z.classification = org.hibernate.test.hql.Classification.LAME" ).list();
-
- s.getTransaction().commit();
- s.close();
- }
-
- public void testParameterTypeMismatchFailureExpected() {
- Session s = openSession();
- s.beginTransaction();
-
- Query query = s.createQuery( "from Animal a where a.description = :nonstring" )
- .setParameter( "nonstring", new Integer(1) );
- try {
- query.list();
- fail( "query execution should have failed" );
- }
- catch( TypeMismatchException tme ) {
- // expected behavior
- }
-
- s.getTransaction().commit();
- s.close();
- }
-
- public void testMultipleBagFetchesFail() {
- Session s = openSession();
- s.beginTransaction();
- try {
- s.createQuery( "from Human h join fetch h.friends f join fetch f.friends fof" ).list();
- fail( "failure expected" );
- }
- catch( HibernateException e ) {
- assertTrue( "unexpected failure reason : " + e, e.getMessage().indexOf( "multiple bags" ) > 0 );
- }
- s.getTransaction().commit();
- s.close();
- }
-
- public void testCollectionJoinsInSubselect() {
- // HHH-1248 : initially FromElementFactory treated any explicit join
- // as an implied join so that theta-style joins would always be used.
- // This was because correlated subqueries cannot use ANSI-style joins
- // for the correlation. However, this special treatment was not limited
- // to only correlated subqueries; it was applied to any subqueries ->
- // which in-and-of-itself is not necessarily bad. But somewhere later
- // the choices made there caused joins to be dropped.
- Session s = openSession();
- String qryString =
- "select a.id, a.description" +
- " from Animal a" +
- " left join a.offspring" +
- " where a in (" +
- " select a1 from Animal a1" +
- " left join a1.offspring o" +
- " where a1.id=1" +
- ")";
- s.createQuery( qryString ).list();
- qryString =
- "select h.id, h.description" +
- " from Human h" +
- " left join h.friends" +
- " where h in (" +
- " select h1" +
- " from Human h1" +
- " left join h1.friends f" +
- " where h1.id=1" +
- ")";
- s.createQuery( qryString ).list();
- qryString =
- "select h.id, h.description" +
- " from Human h" +
- " left join h.friends f" +
- " where f in (" +
- " select h1" +
- " from Human h1" +
- " left join h1.friends f1" +
- " where h = f1" +
- ")";
- s.createQuery( qryString ).list();
- s.close();
- }
-
- public void testCollectionFetchWithDistinctionAndLimit() {
- // create some test data...
- Session s = openSession();
- Transaction t = s.beginTransaction();
- int parentCount = 30;
- for ( int i = 0; i < parentCount; i++ ) {
- Animal child1 = new Animal();
- child1.setDescription( "collection fetch distinction (child1 - parent" + i + ")" );
- s.persist( child1 );
- Animal child2 = new Animal();
- child2.setDescription( "collection fetch distinction (child2 - parent " + i + ")" );
- s.persist( child2 );
- Animal parent = new Animal();
- parent.setDescription( "collection fetch distinction (parent" + i + ")" );
- parent.setSerialNumber( "123-" + i );
- parent.addOffspring( child1 );
- parent.addOffspring( child2 );
- s.persist( parent );
- }
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- // Test simple distinction
- List results;
- results = s.createQuery( "select distinct p from Animal p inner join fetch p.offspring" ).list();
- assertEquals( "duplicate list() returns", 30, results.size() );
- // Test first/max
- results = s.createQuery( "select p from Animal p inner join fetch p.offspring order by p.id" )
- .setFirstResult( 5 )
- .setMaxResults( 20 )
- .list();
- assertEquals( "duplicate returns", 20, results.size() );
- Animal firstReturn = ( Animal ) results.get( 0 );
- assertEquals( "firstResult not applied correctly", "123-5", firstReturn.getSerialNumber() );
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- s.createQuery( "delete Animal where mother is not null" ).executeUpdate();
- s.createQuery( "delete Animal" ).executeUpdate();
- t.commit();
- s.close();
- }
-
- public void testFetchInSubqueryFails() {
- Session s = openSession();
- try {
- s.createQuery( "from Animal a where a.mother in (select m from Animal a1 inner join a1.mother as m join fetch m.mother)" ).list();
- fail( "fetch join allowed in subquery" );
- }
- catch( QueryException expected ) {
- // expected behavior
- }
- s.close();
- }
-
- public void testQueryMetadataRetrievalWithFetching() {
- // HHH-1464 : there was a problem due to the fact they we polled
- // the shallow version of the query plan to get the metadata.
- Session s = openSession();
- Query query = s.createQuery( "from Animal a inner join fetch a.mother" );
- assertEquals( 1, query.getReturnTypes().length );
- assertNull( query.getReturnAliases() );
- s.close();
- }
-
- public void testSuperclassPropertyReferenceAfterCollectionIndexedAccess() {
- // note: simply performing syntax checking in the db
- // test for HHH-429
- Session s = openSession();
- s.beginTransaction();
- Mammal tiger = new Mammal();
- tiger.setDescription( "Tiger" );
- s.persist( tiger );
- Mammal mother = new Mammal();
- mother.setDescription( "Tiger's mother" );
- mother.setBodyWeight( 4.0f );
- mother.addOffspring( tiger );
- s.persist( mother );
- Zoo zoo = new Zoo();
- zoo.setName( "Austin Zoo" );
- zoo.setMammals( new HashMap() );
- zoo.getMammals().put( "tiger", tiger );
- s.persist( zoo );
- s.getTransaction().commit();
- s.close();
-
- s = openSession();
- s.beginTransaction();
- List results = s.createQuery( "from Zoo zoo where zoo.mammals['tiger'].mother.bodyWeight > 3.0f" ).list();
- assertEquals( 1, results.size() );
- s.getTransaction().commit();
- s.close();
-
- s = openSession();
- s.beginTransaction();
- s.delete( tiger );
- s.delete( mother );
- s.delete( zoo );
- s.getTransaction().commit();
- s.close();
- }
-
- public void testJoinFetchCollectionOfValues() {
- // note: simply performing syntax checking in the db
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "select h from Human as h join fetch h.nickNames" ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testIntegerLiterals() {
- // note: simply performing syntax checking in the db
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Foo where long = 1" ).list();
- s.createQuery( "from Foo where long = " + Integer.MIN_VALUE ).list();
- s.createQuery( "from Foo where long = " + Integer.MAX_VALUE ).list();
- s.createQuery( "from Foo where long = 1L" ).list();
- s.createQuery( "from Foo where long = " + (Long.MIN_VALUE + 1) + "L" ).list();
- s.createQuery( "from Foo where long = " + Long.MAX_VALUE + "L" ).list();
- s.createQuery( "from Foo where integer = " + (Long.MIN_VALUE + 1) ).list();
-// currently fails due to HHH-1387
-// s.createQuery( "from Foo where long = " + Long.MIN_VALUE ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testDecimalLiterals() {
- // note: simply performing syntax checking in the db
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Animal where bodyWeight > 100.0e-10" ).list();
- s.createQuery( "from Animal where bodyWeight > 100.0E-10" ).list();
- s.createQuery( "from Animal where bodyWeight > 100.001f" ).list();
- s.createQuery( "from Animal where bodyWeight > 100.001F" ).list();
- s.createQuery( "from Animal where bodyWeight > 100.001d" ).list();
- s.createQuery( "from Animal where bodyWeight > 100.001D" ).list();
- s.createQuery( "from Animal where bodyWeight > .001f" ).list();
- s.createQuery( "from Animal where bodyWeight > 100e-10" ).list();
- s.createQuery( "from Animal where bodyWeight > .01E-10" ).list();
- s.createQuery( "from Animal where bodyWeight > 1e-38" ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testNakedPropertyRef() {
- // note: simply performing syntax and column/table resolution checking in the db
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Animal where bodyWeight = bodyWeight" ).list();
- s.createQuery( "select bodyWeight from Animal" ).list();
- s.createQuery( "select max(bodyWeight) from Animal" ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testNakedComponentPropertyRef() {
- // note: simply performing syntax and column/table resolution checking in the db
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Human where name.first = 'Gavin'" ).list();
- s.createQuery( "select name from Human" ).list();
- s.createQuery( "select upper(h.name.first) from Human as h" ).list();
- s.createQuery( "select upper(name.first) from Human" ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testNakedImplicitJoins() {
- // note: simply performing syntax and column/table resolution checking in the db
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Animal where mother.father.id = 1" ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testNakedEntityAssociationReference() {
- // note: simply performing syntax and column/table resolution checking in the db
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Animal where mother = :mother" ).setParameter( "mother", null ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testNakedMapIndex() throws Exception {
- // note: simply performing syntax and column/table resolution checking in the db
- Session s = openSession();
- s.beginTransaction();
- s.createQuery( "from Zoo where mammals['dog'].description like '%black%'" ).list();
- s.getTransaction().commit();
- s.close();
- }
-
- public void testInvalidFetchSemantics() {
- Session s = openSession();
- s.beginTransaction();
-
- try {
- s.createQuery( "select mother from Human a left join fetch a.mother mother" ).list();
- fail( "invalid fetch semantic allowed!" );
- }
- catch( QueryException e ) {
- }
-
- try {
- s.createQuery( "select mother from Human a left join fetch a.mother mother" ).list();
- fail( "invalid fetch semantic allowed!" );
- }
- catch( QueryException e ) {
- }
-
- s.getTransaction().commit();
- s.close();
- }
-
- public void testArithmetic() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Zoo zoo = new Zoo();
- zoo.setName("Melbourne Zoo");
- s.persist(zoo);
- s.createQuery("select 2*2*2*2*(2*2) from Zoo").uniqueResult();
- s.createQuery("select 2 / (1+1) from Zoo").uniqueResult();
- int result0 = ( (Integer) s.createQuery("select 2 - (1+1) from Zoo").uniqueResult() ).intValue();
- int result1 = ( (Integer) s.createQuery("select 2 - 1 + 1 from Zoo").uniqueResult() ).intValue();
- int result2 = ( (Integer) s.createQuery("select 2 * (1-1) from Zoo").uniqueResult() ).intValue();
- int result3 = ( (Integer) s.createQuery("select 4 / (2 * 2) from Zoo").uniqueResult() ).intValue();
- int result4 = ( (Integer) s.createQuery("select 4 / 2 * 2 from Zoo").uniqueResult() ).intValue();
- int result5 = ( (Integer) s.createQuery("select 2 * (2/2) from Zoo").uniqueResult() ).intValue();
- int result6 = ( (Integer) s.createQuery("select 2 * (2/2+1) from Zoo").uniqueResult() ).intValue();
- assertEquals(result0, 0);
- assertEquals(result1, 2);
- assertEquals(result2, 0);
- assertEquals(result3, 1);
- assertEquals(result4, 4);
- assertEquals(result5, 2);
- assertEquals(result6, 4);
- s.delete(zoo);
- t.commit();
- s.close();
- }
-
- public void testNestedCollectionFetch() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- s.createQuery("from Animal a left join fetch a.offspring o left join fetch o.offspring where a.mother.id = 1 order by a.description").list();
- s.createQuery("from Zoo z left join fetch z.animals a left join fetch a.offspring where z.name ='MZ' order by a.description").list();
- s.createQuery("from Human h left join fetch h.pets a left join fetch a.offspring where h.name.first ='Gavin' order by a.description").list();
- t.commit();
- s.close();
- }
-
- public void testSelectClauseSubselect() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Zoo zoo = new Zoo();
- zoo.setName("Melbourne Zoo");
- zoo.setMammals( new HashMap() );
- zoo.setAnimals( new HashMap() );
- Mammal plat = new Mammal();
- plat.setBodyWeight( 11f );
- plat.setDescription( "Platypus" );
- plat.setZoo(zoo);
- plat.setSerialNumber("plat123");
- zoo.getMammals().put("Platypus", plat);
- zoo.getAnimals().put("plat123", plat);
- s.persist( plat );
- s.persist(zoo);
-
- s.createQuery("select (select max(z.id) from a.zoo z) from Animal a").list();
- s.createQuery("select (select max(z.id) from a.zoo z where z.name=:name) from Animal a")
- .setParameter("name", "Melbourne Zoo").list();
-
- s.delete(plat);
- s.delete(zoo);
- t.commit();
- s.close();
- }
-
- public void testInitProxy() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Mammal plat = new Mammal();
- plat.setBodyWeight( 11f );
- plat.setDescription( "Platypus" );
- s.persist( plat );
- s.flush();
- s.clear();
- plat = (Mammal) s.load(Mammal.class, plat.getId() );
- assertFalse( Hibernate.isInitialized(plat) );
- Object plat2 = s.createQuery("from Animal a").uniqueResult();
- assertSame(plat, plat2);
- assertTrue( Hibernate.isInitialized(plat) );
- s.delete(plat);
- t.commit();
- s.close();
- }
-
- public void testSelectClauseImplicitJoin() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Zoo zoo = new Zoo();
- zoo.setName("The Zoo");
- zoo.setMammals( new HashMap() );
- zoo.setAnimals( new HashMap() );
- Mammal plat = new Mammal();
- plat.setBodyWeight( 11f );
- plat.setDescription( "Platypus" );
- plat.setZoo(zoo);
- plat.setSerialNumber("plat123");
- zoo.getMammals().put("Platypus", plat);
- zoo.getAnimals().put("plat123", plat);
- s.persist( plat );
- s.persist(zoo);
- s.flush();
- s.clear();
- Query q = s.createQuery("select distinct a.zoo from Animal a where a.zoo is not null");
- Type type = q.getReturnTypes()[0];
- assertTrue( type instanceof ManyToOneType );
- assertEquals( ( (ManyToOneType) type ).getAssociatedEntityName(), "org.hibernate.test.hql.Zoo" );
- zoo = (Zoo) q.list().get(0);
- assertEquals( zoo.getMammals().size(), 1 );
- assertEquals( zoo.getAnimals().size(), 1 );
- s.clear();
- s.delete(plat);
- s.delete(zoo);
- t.commit();
- s.close();
- }
-
- public void testSelectClauseImplicitJoinWithIterate() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Zoo zoo = new Zoo();
- zoo.setName("The Zoo");
- zoo.setMammals( new HashMap() );
- zoo.setAnimals( new HashMap() );
- Mammal plat = new Mammal();
- plat.setBodyWeight( 11f );
- plat.setDescription( "Platypus" );
- plat.setZoo(zoo);
- plat.setSerialNumber("plat123");
- zoo.getMammals().put("Platypus", plat);
- zoo.getAnimals().put("plat123", plat);
- s.persist( plat );
- s.persist(zoo);
- s.flush();
- s.clear();
- Query q = s.createQuery("select distinct a.zoo from Animal a where a.zoo is not null");
- Type type = q.getReturnTypes()[0];
- assertTrue( type instanceof ManyToOneType );
- assertEquals( ( (ManyToOneType) type ).getAssociatedEntityName(), "org.hibernate.test.hql.Zoo" );
- zoo = (Zoo) q
- .iterate().next();
- assertEquals( zoo.getMammals().size(), 1 );
- assertEquals( zoo.getAnimals().size(), 1 );
- s.clear();
- s.delete(plat);
- s.delete(zoo);
- t.commit();
- s.close();
- }
-
- public void testComponentOrderBy() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
-
- Long id1 = ( Long ) s.save( genSimpleHuman( "John", "Jacob" ) );
- Long id2 = ( Long ) s.save( genSimpleHuman( "Jingleheimer", "Schmidt" ) );
-
- s.flush();
-
- // the component is defined with the firstName column first...
- List results = s.createQuery( "from Human as h order by h.name" ).list();
- assertEquals( "Incorrect return count", 2, results.size() );
-
- Human h1 = ( Human ) results.get( 0 );
- Human h2 = ( Human ) results.get( 1 );
-
- assertEquals( "Incorrect ordering", id2, h1.getId() );
- assertEquals( "Incorrect ordering", id1, h2.getId() );
-
- s.delete( h1 );
- s.delete( h2 );
-
- t.commit();
- s.close();
- }
-
- private Human genSimpleHuman(String fName, String lName) {
- Human h = new Human();
- h.setName( new Name( fName, 'X', lName ) );
-
- return h;
- }
-
- public void testCastInSelect() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Animal a = new Animal();
- a.setBodyWeight(12.4f);
- a.setDescription("an animal");
- s.persist(a);
- Integer bw = (Integer) s.createQuery("select cast(bodyWeight as integer) from Animal").uniqueResult();
- bw = (Integer) s.createQuery("select cast(a.bodyWeight as integer) from Animal a").uniqueResult();
- bw.toString();
- s.delete(a);
- t.commit();
- s.close();
- }
-
- public void testAliases() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Animal a = new Animal();
- a.setBodyWeight(12.4f);
- a.setDescription("an animal");
- s.persist(a);
- String[] aliases1 = s.createQuery("select a.bodyWeight as abw, a.description from Animal a").getReturnAliases();
- assertEquals(aliases1[0], "abw");
- assertEquals(aliases1[1], "1");
- String[] aliases2 = s.createQuery("select count(*), avg(a.bodyWeight) as avg from Animal a").getReturnAliases();
- assertEquals(aliases2[0], "0");
- assertEquals(aliases2[1], "avg");
- s.delete(a);
- t.commit();
- s.close();
- }
-
- public void testParameterMixing() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- s.createQuery( "from Animal a where a.description = ? and a.bodyWeight = ? or a.bodyWeight = :bw" )
- .setString( 0, "something" )
- .setFloat( 1, 12345f )
- .setFloat( "bw", 123f )
- .list();
- t.commit();
- s.close();
- }
-
- public void testOrdinalParameters() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- s.createQuery( "from Animal a where a.description = ? and a.bodyWeight = ?" )
- .setString( 0, "something" )
- .setFloat( 1, 123f )
- .list();
- s.createQuery( "from Animal a where a.bodyWeight in (?, ?)" )
- .setFloat( 0, 999f )
- .setFloat( 1, 123f )
- .list();
- t.commit();
- s.close();
- }
-
- public void testIndexParams() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- s.createQuery("from Zoo zoo where zoo.mammals[:name] = :id")
- .setParameter("name", "Walrus")
- .setParameter("id", new Long(123))
- .list();
- s.createQuery("from Zoo zoo where zoo.mammals[:name].bodyWeight > :w")
- .setParameter("name", "Walrus")
- .setParameter("w", new Float(123.32))
- .list();
- s.createQuery("from Zoo zoo where zoo.animals[:sn].mother.bodyWeight < :mw")
- .setParameter("sn", "ant-123")
- .setParameter("mw", new Float(23.32))
- .list();
- /*s.createQuery("from Zoo zoo where zoo.animals[:sn].description like :desc and zoo.animals[:sn].bodyWeight > :wmin and zoo.animals[:sn].bodyWeight < :wmax")
- .setParameter("sn", "ant-123")
- .setParameter("desc", "%big%")
- .setParameter("wmin", new Float(123.32))
- .setParameter("wmax", new Float(167.89))
- .list();*/
- /*s.createQuery("from Human where addresses[:type].city = :city and addresses[:type].country = :country")
- .setParameter("type", "home")
- .setParameter("city", "Melbourne")
- .setParameter("country", "Australia")
- .list();*/
- t.commit();
- s.close();
- }
-
- public void testAggregation() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Human h = new Human();
- h.setBodyWeight( (float) 74.0 );
- h.setHeight(120.5);
- h.setDescription("Me");
- h.setName( new Name("Gavin", 'A', "King") );
- h.setNickName("Oney");
- s.persist(h);
- Double sum = (Double) s.createQuery("select sum(h.bodyWeight) from Human h").uniqueResult();
- Double avg = (Double) s.createQuery("select avg(h.height) from Human h").uniqueResult();
- assertEquals(sum.floatValue(), 74.0, 0.01);
- assertEquals(avg.doubleValue(), 120.5, 0.01);
- Long id = (Long) s.createQuery("select max(a.id) from Animal a").uniqueResult();
- s.delete(h);
- t.commit();
- s.close();
- }
-
- public void testSelectClauseCase() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Human h = new Human();
- h.setBodyWeight( (float) 74.0 );
- h.setHeight(120.5);
- h.setDescription("Me");
- h.setName( new Name("Gavin", 'A', "King") );
- h.setNickName("Oney");
- s.persist(h);
- String name = (String) s.createQuery("select case nickName when 'Oney' then 'gavin' when 'Turin' then 'christian' else nickName end from Human").uniqueResult();
- assertEquals(name, "gavin");
- String result = (String) s.createQuery("select case when bodyWeight > 100 then 'fat' else 'skinny' end from Human").uniqueResult();
- assertEquals(result, "skinny");
- s.delete(h);
- t.commit();
- s.close();
- }
-
- public void testImplicitPolymorphism() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
-
- Product product = new Product();
- product.setDescription( "My Product" );
- product.setNumberAvailable( 10 );
- product.setPrice( new BigDecimal( 123 ) );
- product.setProductId( "4321" );
- s.save( product );
-
- List list = s.createQuery("from java.lang.Comparable").list();
- assertEquals( list.size(), 0 );
-
- list = s.createQuery("from java.lang.Object").list();
- assertEquals( list.size(), 1 );
-
- s.delete(product);
-
- list = s.createQuery("from java.lang.Object").list();
- assertEquals( list.size(), 0 );
-
- t.commit();
- s.close();
- }
-
- public void testCoalesce() {
- Session session = openSession();
- Transaction txn = session.beginTransaction();
- session.createQuery("from Human h where coalesce(h.nickName, h.name.first, h.name.last) = 'max'").list();
- session.createQuery("select nullif(nickName, '1e1') from Human").list();
- txn.commit();
- session.close();
- }
-
- public void testStr() {
- Session session = openSession();
- Transaction txn = session.beginTransaction();
- Animal an = new Animal();
- an.setBodyWeight(123.45f);
- session.persist(an);
- String str = (String) session.createQuery("select str(an.bodyWeight) from Animal an where str(an.bodyWeight) like '123%' or str(an.bodyWeight) like '1.23%'").uniqueResult();
- if ( getDialect() instanceof DB2Dialect ) {
- assertTrue( str.startsWith("1.234") );
- }
- else if ( getDialect() instanceof SQLServerDialect ) {
- // no assertion as SQLServer always returns nulls here; even trying directly against the
- // database, it seems to have problems with str() in the where clause...
- }
- else {
- assertTrue( str.startsWith("123.4") );
- }
- if ( ! ( getDialect() instanceof SybaseDialect ) ) {
- // In TransactSQL (the variant spoken by Sybase and SQLServer), the str() function
- // is explicitly intended for numeric values only...
- String dateStr1 = (String) session.createQuery("select str(current_date) from Animal").uniqueResult();
- String dateStr2 = (String) session.createQuery("select str(year(current_date))||'-'||str(month(current_date))||'-'||str(day(current_date)) from Animal").uniqueResult();
- System.out.println(dateStr1 + '=' + dateStr2);
- if ( ! ( getDialect() instanceof Oracle9Dialect || getDialect() instanceof Oracle8iDialect ) ) { //Oracle renders the name of the month :(
- String[] dp1 = StringHelper.split("-", dateStr1);
- String[] dp2 = StringHelper.split("-", dateStr2);
- for (int i=0; i<3; i++) {
- if ( dp1[i].startsWith( "0" ) ) {
- dp1[i] = dp1[i].substring( 1 );
- }
- assertEquals( dp1[i], dp2[i] );
- }
- }
- }
- session.delete(an);
- txn.commit();
- session.close();
- }
-
- public void testCast() {
- if ( ( getDialect() instanceof MySQLDialect ) || ( getDialect() instanceof DB2Dialect ) ) {
- return;
- }
- Session session = openSession();
- Transaction txn = session.beginTransaction();
- session.createQuery("from Human h where h.nickName like 'G%'").list();
- session.createQuery("from Animal a where cast(a.bodyWeight as string) like '1.%'").list();
- session.createQuery("from Animal a where cast(a.bodyWeight as integer) = 1").list();
- txn.commit();
- session.close();
- }
-
- public void testExtract() {
- Session session = openSession();
- Transaction txn = session.beginTransaction();
- session.createQuery("select second(current_timestamp()), minute(current_timestamp()), hour(current_timestamp()) from Mammal m").list();
- session.createQuery("select day(m.birthdate), month(m.birthdate), year(m.birthdate) from Mammal m").list();
- if ( !(getDialect() instanceof DB2Dialect) ) { //no ANSI extract
- session.createQuery("select extract(second from current_timestamp()), extract(minute from current_timestamp()), extract(hour from current_timestamp()) from Mammal m").list();
- session.createQuery("select extract(day from m.birthdate), extract(month from m.birthdate), extract(year from m.birthdate) from Mammal m").list();
- }
- txn.commit();
- session.close();
- }
-
- public void testOneToManyFilter() throws Throwable {
- Session session = openSession();
- Transaction txn = session.beginTransaction();
-
- Product product = new Product();
- product.setDescription( "My Product" );
- product.setNumberAvailable( 10 );
- product.setPrice( new BigDecimal( 123 ) );
- product.setProductId( "4321" );
- session.save( product );
-
- Customer customer = new Customer();
- customer.setCustomerId( "123456789" );
- customer.setName( "My customer" );
- customer.setAddress( "somewhere" );
- session.save( customer );
-
- Order order = customer.generateNewOrder( new BigDecimal( 1234 ) );
- session.save( order );
-
- LineItem li = order.generateLineItem( product, 5 );
- session.save( li );
-
- session.flush();
-
- assertEquals( session.createFilter( customer.getOrders(), "" ).list().size(), 1 );
-
- assertEquals( session.createFilter( order.getLineItems(), "" ).list().size(), 1 );
- assertEquals( session.createFilter( order.getLineItems(), "where this.quantity > :quantity" ).setInteger( "quantity", 5 ).list().size(), 0 );
-
- session.delete(li);
- session.delete(order);
- session.delete(product);
- session.delete(customer);
- txn.commit();
- session.close();
- }
-
- public void testManyToManyFilter() throws Throwable {
- Session session = openSession();
- Transaction txn = session.beginTransaction();
-
- Human human = new Human();
- human.setName( new Name( "Steve", 'L', "Ebersole" ) );
- session.save( human );
-
- Human friend = new Human();
- friend.setName( new Name( "John", 'Q', "Doe" ) );
- friend.setBodyWeight( 11.0f );
- session.save( friend );
-
- human.setFriends( new ArrayList() );
- friend.setFriends( new ArrayList() );
- human.getFriends().add( friend );
- friend.getFriends().add( human );
-
- session.flush();
-
- assertEquals( session.createFilter( human.getFriends(), "" ).list().size(), 1 );
- assertEquals( session.createFilter( human.getFriends(), "where this.bodyWeight > ?" ).setFloat( 0, 10f ).list().size(), 1 );
- assertEquals( session.createFilter( human.getFriends(), "where this.bodyWeight < ?" ).setFloat( 0, 10f ).list().size(), 0 );
-
- session.delete(human);
- session.delete(friend);
-
- txn.commit();
- session.close();
- }
-
- public void testSelectExpressions() {
- createTestBaseData();
- Session session = openSession();
- Transaction txn = session.beginTransaction();
- Human h = new Human();
- h.setName( new Name("Gavin", 'A', "King") );
- h.setNickName("Oney");
- h.setBodyWeight(1.0f);
- session.persist(h);
- List results = session.createQuery("select 'found', lower(h.name.first) from Human h where lower(h.name.first) = 'gavin'").list();
- results = session.createQuery("select 'found', lower(h.name.first) from Human h where concat(h.name.first, ' ', h.name.initial, ' ', h.name.last) = 'Gavin A King'").list();
- results = session.createQuery("select 'found', lower(h.name.first) from Human h where h.name.first||' '||h.name.initial||' '||h.name.last = 'Gavin A King'").list();
- results = session.createQuery("select a.bodyWeight + m.bodyWeight from Animal a join a.mother m").list();
- results = session.createQuery("select 2.0 * (a.bodyWeight + m.bodyWeight) from Animal a join a.mother m").list();
- results = session.createQuery("select sum(a.bodyWeight + m.bodyWeight) from Animal a join a.mother m").list();
- results = session.createQuery("select sum(a.mother.bodyWeight * 2.0) from Animal a").list();
- results = session.createQuery("select concat(h.name.first, ' ', h.name.initial, ' ', h.name.last) from Human h").list();
- results = session.createQuery("select h.name.first||' '||h.name.initial||' '||h.name.last from Human h").list();
- results = session.createQuery("select nickName from Human").list();
- results = session.createQuery("select lower(nickName) from Human").list();
- results = session.createQuery("select abs(bodyWeight*-1) from Human").list();
- results = session.createQuery("select upper(h.name.first||' ('||h.nickName||')') from Human h").list();
- results = session.createQuery("select abs(a.bodyWeight-:param) from Animal a").setParameter("param", new Float(2.0)).list();
- results = session.createQuery("select abs(:param - a.bodyWeight) from Animal a").setParameter("param", new Float(2.0)).list();
- results = session.createQuery("select lower(upper('foo')) from Animal").list();
- results = session.createQuery("select lower(upper('foo') || upper('bar')) from Animal").list();
- results = session.createQuery("select sum(abs(bodyWeight - 1.0) * abs(length('ffobar')-3)) from Animal").list();
- session.delete(h);
- txn.commit();
- session.close();
- destroyTestBaseData();
- }
-
- private void createTestBaseData() {
- Session session = openSession();
- Transaction txn = session.beginTransaction();
-
- Mammal m1 = new Mammal();
- m1.setBodyWeight( 11f );
- m1.setDescription( "Mammal #1" );
-
- session.save( m1 );
-
- Mammal m2 = new Mammal();
- m2.setBodyWeight( 9f );
- m2.setDescription( "Mammal #2" );
- m2.setMother( m1 );
-
- session.save( m2 );
-
- txn.commit();
- session.close();
-
- createdAnimalIds.add( m1.getId() );
- createdAnimalIds.add( m2.getId() );
- }
-
- private void destroyTestBaseData() {
- Session session = openSession();
- Transaction txn = session.beginTransaction();
-
- for ( int i = 0; i < createdAnimalIds.size(); i++ ) {
- Animal animal = ( Animal ) session.load( Animal.class, ( Long ) createdAnimalIds.get( i ) );
- session.delete( animal );
- }
-
- txn.commit();
- session.close();
- }
-
- public void testImplicitJoin() throws Exception {
- Session session = openSession();
- Transaction t = session.beginTransaction();
- Animal a = new Animal();
- a.setBodyWeight(0.5f);
- a.setBodyWeight(1.5f);
- Animal b = new Animal();
- Animal mother = new Animal();
- mother.setBodyWeight(10.0f);
- mother.addOffspring(a);
- mother.addOffspring(b);
- session.persist(a);
- session.persist(b);
- session.persist(mother);
- List list = session.createQuery("from Animal a where a.mother.bodyWeight < 2.0 or a.mother.bodyWeight > 9.0").list();
- assertEquals( list.size(), 2 );
- list = session.createQuery("from Animal a where a.mother.bodyWeight > 2.0 and a.mother.bodyWeight > 9.0").list();
- assertEquals( list.size(), 2 );
- session.delete(b);
- session.delete(a);
- session.delete(mother);
- t.commit();
- session.close();
- }
-
- public void testFromOnly() throws Exception {
-
- createTestBaseData();
-
- Session session = openSession();
-
- List results = session.createQuery( "from Animal" ).list();
- assertEquals( "Incorrect result size", 2, results.size() );
- assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testSimpleSelect() throws Exception {
-
- createTestBaseData();
-
- Session session = openSession();
-
- List results = session.createQuery( "select a from Animal as a" ).list();
- assertEquals( "Incorrect result size", 2, results.size() );
- assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testEntityPropertySelect() throws Exception {
-
- createTestBaseData();
-
- Session session = openSession();
-
- List results = session.createQuery( "select a.mother from Animal as a" ).list();
-// assertEquals("Incorrect result size", 2, results.size());
- assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testWhere() throws Exception {
-
- createTestBaseData();
-
- Session session = openSession();
- List results = null;
-
- results = session.createQuery( "from Animal an where an.bodyWeight > 10" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
-
- results = session.createQuery( "from Animal an where not an.bodyWeight > 10" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
-
- results = session.createQuery( "from Animal an where an.bodyWeight between 0 and 10" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
-
- results = session.createQuery( "from Animal an where an.bodyWeight not between 0 and 10" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
-
- results = session.createQuery( "from Animal an where sqrt(an.bodyWeight)/2 > 10" ).list();
- assertEquals( "Incorrect result size", 0, results.size() );
-
- results = session.createQuery( "from Animal an where (an.bodyWeight > 10 and an.bodyWeight < 100) or an.bodyWeight is null" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testEntityFetching() throws Exception {
-
- createTestBaseData();
-
- Session session = openSession();
-
- List results = session.createQuery( "from Animal an join fetch an.mother" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
- assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
- Animal mother = ( ( Animal ) results.get( 0 ) ).getMother();
- assertTrue( "fetch uninitialized", mother != null && Hibernate.isInitialized( mother ) );
-
- results = session.createQuery( "select an from Animal an join fetch an.mother" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
- assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
- mother = ( ( Animal ) results.get( 0 ) ).getMother();
- assertTrue( "fetch uninitialized", mother != null && Hibernate.isInitialized( mother ) );
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testCollectionFetching() throws Exception {
-
- createTestBaseData();
-
- Session session = openSession();
- List results = session.createQuery( "from Animal an join fetch an.offspring" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
- assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
- Collection os = ( ( Animal ) results.get( 0 ) ).getOffspring();
- assertTrue( "fetch uninitialized", os != null && Hibernate.isInitialized( os ) && os.size() == 1 );
-
- results = session.createQuery( "select an from Animal an join fetch an.offspring" ).list();
- assertEquals( "Incorrect result size", 1, results.size() );
- assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
- os = ( ( Animal ) results.get( 0 ) ).getOffspring();
- assertTrue( "fetch uninitialized", os != null && Hibernate.isInitialized( os ) && os.size() == 1 );
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testProjectionQueries() throws Exception {
-
- createTestBaseData();
-
- Session session = openSession();
-
- List results = session.createQuery( "select an.mother.id, max(an.bodyWeight) from Animal an group by an.mother.id" ).list();
- // mysql returns nulls in this group by
- assertEquals( "Incorrect result size", 2, results.size() );
- assertTrue( "Incorrect return type", results.get( 0 ) instanceof Object[] );
- assertEquals( "Incorrect return dimensions", 2, ( ( Object[] ) results.get( 0 ) ).length );
-
- session.close();
-
- destroyTestBaseData();
-
- }
-
- public void testStandardFunctions() throws Exception {
- Session session = openSession();
- Transaction t = session.beginTransaction();
- Product p = new Product();
- p.setDescription("a product");
- p.setPrice( new BigDecimal(1.0) );
- p.setProductId("abc123");
- session.persist(p);
- Object[] result = (Object[]) session
- .createQuery("select current_time(), current_date(), current_timestamp() from Product")
- .uniqueResult();
- assertTrue( result[0] instanceof Time );
- assertTrue( result[1] instanceof Date );
- assertTrue( result[2] instanceof Timestamp );
- assertNotNull( result[0] );
- assertNotNull( result[1] );
- assertNotNull( result[2] );
- session.delete(p);
- t.commit();
- session.close();
-
- }
-
- public void testDynamicInstantiationQueries() throws Exception {
-
- createTestBaseData();
-
- Session session = openSession();
-
- List results = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" ).list();
- assertEquals( "Incorrect result size", 2, results.size() );
- assertClassAssignability( results.get( 0 ).getClass(), Animal.class );
-
- Iterator iter = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" ).iterate();
- assertTrue( "Incorrect result size", iter.hasNext() );
- assertTrue( "Incorrect return type", iter.next() instanceof Animal );
-
- results = session.createQuery( "select new list(an.description, an.bodyWeight) from Animal an" ).list();
- assertEquals( "Incorrect result size", 2, results.size() );
- assertTrue( "Incorrect return type", results.get( 0 ) instanceof List );
- assertEquals( "Incorrect return type", ( (List) results.get( 0 ) ).size(), 2 );
-
- results = session.createQuery( "select new list(an.description, an.bodyWeight) from Animal an" ).list();
- assertEquals( "Incorrect result size", 2, results.size() );
- assertTrue( "Incorrect return type", results.get( 0 ) instanceof List );
- assertEquals( "Incorrect return type", ( (List) results.get( 0 ) ).size(), 2 );
-
- iter = session.createQuery( "select new list(an.description, an.bodyWeight) from Animal an" ).iterate();
- assertTrue( "Incorrect result size", iter.hasNext() );
- Object obj = iter.next();
- assertTrue( "Incorrect return type", obj instanceof List );
- assertEquals( "Incorrect return type", ( (List) obj ).size(), 2 );
-
- iter = ((org.hibernate.classic.Session)session).iterate( "select new list(an.description, an.bodyWeight) from Animal an" );
- assertTrue( "Incorrect result size", iter.hasNext() );
- obj = iter.next();
- assertTrue( "Incorrect return type", obj instanceof List );
- assertEquals( "Incorrect return type", ( (List) obj ).size(), 2 );
-
- results = session.createQuery( "select new map(an.description, an.bodyWeight) from Animal an" ).list();
- assertEquals( "Incorrect result size", 2, results.size() );
- assertTrue( "Incorrect return type", results.get( 0 ) instanceof Map );
- assertEquals( "Incorrect return type", ( (Map) results.get( 0 ) ).size(), 2 );
- assertTrue( ( (Map) results.get( 0 ) ).containsKey("0") );
- assertTrue( ( (Map) results.get( 0 ) ).containsKey("1") );
-
- results = session.createQuery( "select new map(an.description as descr, an.bodyWeight as bw) from Animal an" ).list();
- assertEquals( "Incorrect result size", 2, results.size() );
- assertTrue( "Incorrect return type", results.get( 0 ) instanceof Map );
- assertEquals( "Incorrect return type", ( (Map) results.get( 0 ) ).size(), 2 );
- assertTrue( ( (Map) results.get( 0 ) ).containsKey("descr") );
- assertTrue( ( (Map) results.get( 0 ) ).containsKey("bw") );
-
- iter = session.createQuery( "select new map(an.description, an.bodyWeight) from Animal an" ).iterate();
- assertTrue( "Incorrect result size", iter.hasNext() );
- obj = iter.next();
- assertTrue( "Incorrect return type", obj instanceof Map );
- assertEquals( "Incorrect return type", ( (Map) obj ).size(), 2 );
-
- ScrollableResults sr = session.createQuery( "select new map(an.description, an.bodyWeight) from Animal an" ).scroll();
- assertTrue( "Incorrect result size", sr.next() );
- obj = sr.get(0);
- assertTrue( "Incorrect return type", obj instanceof Map );
- assertEquals( "Incorrect return type", ( (Map) obj ).size(), 2 );
- sr.close();
-
- sr = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" ).scroll();
- assertTrue( "Incorrect result size", sr.next() );
- assertTrue( "Incorrect return type", sr.get(0) instanceof Animal );
- sr.close();
-
- // caching...
- QueryStatistics stats = getSessions().getStatistics().getQueryStatistics( "select new Animal(an.description, an.bodyWeight) from Animal an" );
- results = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" )
- .setCacheable( true )
- .list();
- assertEquals( "incorrect result size", 2, results.size() );
- assertClassAssignability( Animal.class, results.get( 0 ).getClass() );
- long initCacheHits = stats.getCacheHitCount();
- results = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" )
- .setCacheable( true )
- .list();
- assertEquals( "dynamic intantiation query not served from cache", initCacheHits + 1, stats.getCacheHitCount() );
- assertEquals( "incorrect result size", 2, results.size() );
- assertClassAssignability( Animal.class, results.get( 0 ).getClass() );
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testIllegalMixedTransformerQueries() {
- Session session = openSession();
-
- try {
- getSelectNewQuery( session ).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
- fail("'select new' together with a resulttransformer should result in error!");
- } catch(QueryException he) {
- assertTrue(he.getMessage().indexOf("ResultTransformer")==0);
- }
-
- try {
- getSelectNewQuery( session ).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).iterate();
- fail("'select new' together with a resulttransformer should result in error!");
- } catch(HibernateException he) {
- assertTrue(he.getMessage().indexOf("ResultTransformer")==0);
- }
-
- try {
- getSelectNewQuery( session ).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).scroll();
- fail("'select new' together with a resulttransformer should result in error!");
- } catch(HibernateException he) {
- assertTrue(he.getMessage().indexOf("ResultTransformer")==0);
- }
-
- session.close();
- }
-
- private Query getSelectNewQuery(Session session) {
- return session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" );
- }
- public void testResultTransformerScalarQueries() throws Exception {
-
- createTestBaseData();
-
- String query = "select an.description as description, an.bodyWeight as bodyWeight from Animal an order by bodyWeight desc";
-
- Session session = openSession();
-
- List results = session.createQuery( query )
- .setResultTransformer(Transformers.aliasToBean(Animal.class)).list();
- assertEquals( "Incorrect result size", results.size(), 2 );
- assertTrue( "Incorrect return type", results.get(0) instanceof Animal );
- Animal firstAnimal = (Animal) results.get(0);
- Animal secondAnimal = (Animal) results.get(1);
- assertEquals("Mammal #1", firstAnimal.getDescription());
- assertEquals("Mammal #2", secondAnimal.getDescription());
- assertFalse(session.contains(firstAnimal));
- session.close();
-
- session = openSession();
-
- Iterator iter = session.createQuery( query )
- .setResultTransformer(Transformers.aliasToBean(Animal.class)).iterate();
- assertTrue( "Incorrect result size", iter.hasNext() );
- assertTrue( "Incorrect return type", iter.next() instanceof Animal );
-
- session.close();
-
- session = openSession();
-
- ScrollableResults sr = session.createQuery( query )
- .setResultTransformer(Transformers.aliasToBean(Animal.class)).scroll();
- assertTrue( "Incorrect result size", sr.next() );
- assertTrue( "Incorrect return type", sr.get(0) instanceof Animal );
- assertFalse(session.contains(sr.get(0)));
- sr.close();
-
- session.close();
-
- session = openSession();
-
- results = session.createQuery( "select a from Animal a, Animal b order by a.id" )
- .setResultTransformer(new DistinctRootEntityResultTransformer())
- .list();
- assertEquals( "Incorrect result size", 2, results.size());
- assertTrue( "Incorrect return type", results.get(0) instanceof Animal );
- firstAnimal = (Animal) results.get(0);
- secondAnimal = (Animal) results.get(1);
- assertEquals("Mammal #1", firstAnimal.getDescription());
- assertEquals("Mammal #2", secondAnimal.getDescription());
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testResultTransformerEntityQueries() throws Exception {
-
- createTestBaseData();
-
- String query = "select an as an from Animal an order by bodyWeight desc";
-
- Session session = openSession();
-
- List results = session.createQuery( query )
- .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
- assertEquals( "Incorrect result size", results.size(), 2 );
- assertTrue( "Incorrect return type", results.get(0) instanceof Map );
- Map map = ((Map) results.get(0));
- assertEquals(1, map.size());
- Animal firstAnimal = (Animal) map.get("an");
- map = ((Map) results.get(1));
- Animal secondAnimal = (Animal) map.get("an");
- assertEquals("Mammal #1", firstAnimal.getDescription());
- assertEquals("Mammal #2", secondAnimal.getDescription());
- assertTrue(session.contains(firstAnimal));
- assertSame(firstAnimal, session.get(Animal.class,firstAnimal.getId()));
- session.close();
-
- session = openSession();
-
- Iterator iter = session.createQuery( query )
- .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).iterate();
- assertTrue( "Incorrect result size", iter.hasNext() );
- map = (Map) iter.next();
- firstAnimal = (Animal) map.get("an");
- assertEquals("Mammal #1", firstAnimal.getDescription());
- assertTrue( "Incorrect result size", iter.hasNext() );
-
- session.close();
-
- session = openSession();
-
- ScrollableResults sr = session.createQuery( query )
- .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).scroll();
- assertTrue( "Incorrect result size", sr.next() );
- assertTrue( "Incorrect return type", sr.get(0) instanceof Map );
- assertFalse(session.contains(sr.get(0)));
- sr.close();
-
- session.close();
-
- destroyTestBaseData();
- }
-
- public void testEJBQLFunctions() throws Exception {
- Session session = openSession();
-
- String hql = "from Animal a where a.description = concat('1', concat('2','3'), '4'||'5')||'0'";
- session.createQuery(hql).list();
-
- hql = "from Animal a where substring(a.description, 1, 3) = 'cat'";
- session.createQuery(hql).list();
-
- hql = "select substring(a.description, 1, 3) from Animal a";
- session.createQuery(hql).list();
-
- hql = "from Animal a where lower(a.description) = 'cat'";
- session.createQuery(hql).list();
-
- hql = "select lower(a.description) from Animal a";
- session.createQuery(hql).list();
-
- hql = "from Animal a where upper(a.description) = 'CAT'";
- session.createQuery(hql).list();
-
- hql = "select upper(a.description) from Animal a";
- session.createQuery(hql).list();
-
- hql = "from Animal a where length(a.description) = 5";
- session.createQuery(hql).list();
-
- hql = "select length(a.description) from Animal a";
- session.createQuery(hql).list();
-
- //note: postgres and db2 don't have a 3-arg form, it gets transformed to 2-args
- hql = "from Animal a where locate('abc', a.description, 2) = 2";
- session.createQuery(hql).list();
-
- hql = "from Animal a where locate('abc', a.description) = 2";
- session.createQuery(hql).list();
-
- hql = "select locate('cat', a.description, 2) from Animal a";
- session.createQuery(hql).list();
-
- if ( !( getDialect() instanceof DB2Dialect ) ) {
- hql = "from Animal a where trim(trailing '_' from a.description) = 'cat'";
- session.createQuery(hql).list();
-
- hql = "select trim(trailing '_' from a.description) from Animal a";
- session.createQuery(hql).list();
-
- hql = "from Animal a where trim(leading '_' from a.description) = 'cat'";
- session.createQuery(hql).list();
-
- hql = "from Animal a where trim(both from a.description) = 'cat'";
- session.createQuery(hql).list();
- }
-
- if ( !(getDialect() instanceof HSQLDialect) ) { //HSQL doesn't like trim() without specification
- hql = "from Animal a where trim(a.description) = 'cat'";
- session.createQuery(hql).list();
- }
-
- hql = "from Animal a where abs(a.bodyWeight) = sqrt(a.bodyWeight)";
- session.createQuery(hql).list();
-
- hql = "from Animal a where mod(16, 4) = 4";
- session.createQuery(hql).list();
-
- hql = "from Animal a where bit_length(a.bodyWeight) = 24";
- session.createQuery(hql).list();
-
- hql = "select bit_length(a.bodyWeight) from Animal a";
- session.createQuery(hql).list();
-
- /*hql = "select object(a) from Animal a where CURRENT_DATE = :p1 or CURRENT_TIME = :p2 or CURRENT_TIMESTAMP = :p3";
- session.createQuery(hql).list();*/
-
- // todo the following is not supported
- //hql = "select CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP from Animal a";
- //parse(hql, true);
- //System.out.println("sql: " + toSql(hql));
-
- hql = "from Animal a where a.description like '%a%'";
- session.createQuery(hql).list();
-
- hql = "from Animal a where a.description not like '%a%'";
- session.createQuery(hql).list();
-
- hql = "from Animal a where a.description like 'x%ax%' escape 'x'";
- session.createQuery(hql).list();
-
- session.close();
- }
-
- public void testSubselectBetween() {
- if ( supportsSubselectOnLeftSideIn() ) {
- assertResultSize( "from Animal x where (select max(a.bodyWeight) from Animal a) in (1,2,3)", 0 );
- assertResultSize( "from Animal x where (select max(a.bodyWeight) from Animal a) between 0 and 100", 0 );
- assertResultSize( "from Animal x where (select max(a.description) from Animal a) like 'big%'", 0 );
- assertResultSize( "from Animal x where (select max(a.bodyWeight) from Animal a) is not null", 0 );
- }
- assertResultSize( "from Animal x where exists (select max(a.bodyWeight) from Animal a)", 0 );
- }
-
- private void assertResultSize(String hql, int size) {
- Session session = openSession();
- Transaction txn = session.beginTransaction();
- assertEquals( size, session.createQuery(hql).list().size() );
- txn.commit();
- session.close();
- }
-
- private interface QueryPreparer {
- public void prepare(Query query);
- }
-
- private static final QueryPreparer DEFAULT_PREPARER = new QueryPreparer() {
- public void prepare(Query query) {
- }
- };
-
- private class SyntaxChecker {
- private final String hql;
- private final QueryPreparer preparer;
-
- public SyntaxChecker(String hql) {
- this( hql, DEFAULT_PREPARER );
- }
-
- public SyntaxChecker(String hql, QueryPreparer preparer) {
- this.hql = hql;
- this.preparer = preparer;
- }
-
- public void checkAll() {
- checkList();
- checkIterate();
- checkScroll();
- }
-
- public SyntaxChecker checkList() {
- Session s = openSession();
- s.beginTransaction();
- Query query = s.createQuery( hql );
- preparer.prepare( query );
- query.list();
- s.getTransaction().commit();
- s.close();
- return this;
- }
-
- public SyntaxChecker checkScroll() {
- Session s = openSession();
- s.beginTransaction();
- Query query = s.createQuery( hql );
- preparer.prepare( query );
- query.scroll();
- s.getTransaction().commit();
- s.close();
- return this;
- }
-
- public SyntaxChecker checkIterate() {
- Session s = openSession();
- s.beginTransaction();
- Query query = s.createQuery( hql );
- preparer.prepare( query );
- query.iterate();
- s.getTransaction().commit();
- s.close();
- return this;
- }
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java (from rev 15179, core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,1952 @@
+// $Id: ASTParserLoadingTest.java 11373 2007-03-29 19:09:07Z steve.ebersole(a)jboss.com $
+package org.hibernate.test.hql;
+
+import java.math.BigDecimal;
+import java.sql.Date;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.hibernate.Hibernate;
+import org.hibernate.HibernateException;
+import org.hibernate.Query;
+import org.hibernate.QueryException;
+import org.hibernate.ScrollableResults;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.hibernate.TypeMismatchException;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.dialect.DB2Dialect;
+import org.hibernate.dialect.HSQLDialect;
+import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.dialect.Oracle9Dialect;
+import org.hibernate.dialect.PostgreSQLDialect;
+import org.hibernate.dialect.SQLServerDialect;
+import org.hibernate.dialect.SybaseDialect;
+import org.hibernate.dialect.Oracle8iDialect;
+import org.hibernate.hql.ast.ASTQueryTranslatorFactory;
+import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
+import org.hibernate.stat.QueryStatistics;
+import org.hibernate.test.any.IntegerPropertyValue;
+import org.hibernate.test.any.PropertySet;
+import org.hibernate.test.any.PropertyValue;
+import org.hibernate.test.any.StringPropertyValue;
+import org.hibernate.test.cid.Customer;
+import org.hibernate.test.cid.LineItem;
+import org.hibernate.test.cid.Order;
+import org.hibernate.test.cid.Product;
+import org.hibernate.transform.DistinctRootEntityResultTransformer;
+import org.hibernate.transform.Transformers;
+import org.hibernate.type.ComponentType;
+import org.hibernate.type.ManyToOneType;
+import org.hibernate.type.Type;
+import org.hibernate.util.StringHelper;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Tests the integration of the new AST parser into the loading of query results using
+ * the Hibernate persisters and loaders.
+ * <p/>
+ * Also used to test the syntax of the resulting sql against the underlying
+ * database, specifically for functionality not supported by the classic
+ * parser.
+ *
+ * @author Steve
+ */
+public class ASTParserLoadingTest extends FunctionalTestCase {
+
+ private static final Logger log = LoggerFactory.getLogger( ASTParserLoadingTest.class );
+
+ private List createdAnimalIds = new ArrayList();
+
+ public ASTParserLoadingTest(String name) {
+ super( name );
+ }
+
+ public String[] getMappings() {
+ return new String[] {
+ "hql/Animal.hbm.xml",
+ "hql/FooBarCopy.hbm.xml",
+ "hql/SimpleEntityWithAssociation.hbm.xml",
+ "hql/CrazyIdFieldNames.hbm.xml",
+ "batchfetch/ProductLine.hbm.xml",
+ "cid/Customer.hbm.xml",
+ "cid/Order.hbm.xml",
+ "cid/LineItem.hbm.xml",
+ "cid/Product.hbm.xml",
+ "any/Properties.hbm.xml",
+ "legacy/Commento.hbm.xml",
+ "legacy/Marelo.hbm.xml"
+ };
+ }
+
+ public void configure(Configuration cfg) {
+ super.configure( cfg );
+ cfg.setProperty( Environment.USE_QUERY_CACHE, "true" );
+ cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
+ cfg.setProperty( Environment.QUERY_TRANSLATOR, ASTQueryTranslatorFactory.class.getName() );
+ }
+
+ public static Test suite() {
+ return new FunctionalTestClassTestSuite( ASTParserLoadingTest.class );
+ }
+
+ public void testComponentNullnessChecks() {
+ Session s = openSession();
+ s.beginTransaction();
+ Human h = new Human();
+ h.setName( new Name( "Johnny", 'B', "Goode" ) );
+ s.save( h );
+ h = new Human();
+ h.setName( new Name( "Steve", null, "Ebersole" ) );
+ s.save( h );
+ h = new Human();
+ h.setName( new Name( "Bono", null, null ) );
+ s.save( h );
+ h = new Human();
+ h.setName( new Name( null, null, null ) );
+ s.save( h );
+ s.getTransaction().commit();
+ s.close();
+
+ s = openSession();
+ s.beginTransaction();
+ List results = s.createQuery( "from Human where name is null" ).list();
+ assertEquals( 1, results.size() );
+ results = s.createQuery( "from Human where name is not null" ).list();
+ assertEquals( 3, results.size() );
+ s.createQuery( "from Human where ? is null" ).setParameter( 0, null ).list();
+ s.getTransaction().commit();
+ s.close();
+
+ s = openSession();
+ s.beginTransaction();
+ s.createQuery( "delete Human" ).executeUpdate();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testInvalidCollectionDereferencesFail() {
+ Session s = openSession();
+ s.beginTransaction();
+
+ // control group...
+ s.createQuery( "from Animal a join a.offspring o where o.description = 'xyz'" ).list();
+ s.createQuery( "from Animal a join a.offspring o where o.father.description = 'xyz'" ).list();
+ s.createQuery( "from Animal a join a.offspring o order by o.description" ).list();
+ s.createQuery( "from Animal a join a.offspring o order by o.father.description" ).list();
+
+ try {
+ s.createQuery( "from Animal a where a.offspring.description = 'xyz'" ).list();
+ fail( "illegal collection dereference semantic did not cause failure" );
+ }
+ catch( QueryException qe ) {
+ log.trace( "expected failure...", qe );
+ }
+
+ try {
+ s.createQuery( "from Animal a where a.offspring.father.description = 'xyz'" ).list();
+ fail( "illegal collection dereference semantic did not cause failure" );
+ }
+ catch( QueryException qe ) {
+ log.trace( "expected failure...", qe );
+ }
+
+ try {
+ s.createQuery( "from Animal a order by a.offspring.description" ).list();
+ fail( "illegal collection dereference semantic did not cause failure" );
+ }
+ catch( QueryException qe ) {
+ log.trace( "expected failure...", qe );
+ }
+
+ try {
+ s.createQuery( "from Animal a order by a.offspring.father.description" ).list();
+ fail( "illegal collection dereference semantic did not cause failure" );
+ }
+ catch( QueryException qe ) {
+ log.trace( "expected failure...", qe );
+ }
+
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ /**
+ * Copied from {@link HQLTest#testConcatenation}
+ */
+ public void testConcatenation() {
+ // simple syntax checking...
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Human h where h.nickName = '1' || 'ov' || 'tha' || 'few'" ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ /**
+ * Copied from {@link HQLTest#testExpressionWithParamInFunction}
+ */
+ public void testExpressionWithParamInFunction() {
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Animal a where abs(a.bodyWeight-:param) < 2.0" ).setLong( "param", 1 ).list();
+ s.createQuery( "from Animal a where abs(:param - a.bodyWeight) < 2.0" ).setLong( "param", 1 ).list();
+ if ( ! ( getDialect() instanceof HSQLDialect ) ) {
+ // HSQLDB does not like the abs(? - ?) syntax...
+ s.createQuery( "from Animal where abs(:x - :y) < 2.0" ).setLong( "x", 1 ).setLong( "y", 1 ).list();
+ }
+ s.createQuery( "from Animal where lower(upper(:foo)) like 'f%'" ).setString( "foo", "foo" ).list();
+ s.createQuery( "from Animal a where abs(abs(a.bodyWeight - 1.0 + :param) * abs(length('ffobar')-3)) = 3.0" ).setLong( "param", 1 ).list();
+ s.createQuery( "from Animal where lower(upper('foo') || upper(:bar)) like 'f%'" ).setString( "bar", "xyz" ).list();
+ if ( ! ( getDialect() instanceof PostgreSQLDialect || getDialect() instanceof MySQLDialect ) ) {
+ s.createQuery( "from Animal where abs(cast(1 as float) - cast(:param as float)) = 1.0" ).setLong( "param", 1 ).list();
+ }
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testCrazyIdFieldNames() {
+ MoreCrazyIdFieldNameStuffEntity top = new MoreCrazyIdFieldNameStuffEntity( "top" );
+ HeresAnotherCrazyIdFieldName next = new HeresAnotherCrazyIdFieldName( "next" );
+ top.setHeresAnotherCrazyIdFieldName( next );
+ MoreCrazyIdFieldNameStuffEntity other = new MoreCrazyIdFieldNameStuffEntity( "other" );
+ Session s = openSession();
+ s.beginTransaction();
+ s.save( next );
+ s.save( top );
+ s.save( other );
+ s.flush();
+
+ List results = s.createQuery( "select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e where e.heresAnotherCrazyIdFieldName is not null" ).list();
+ assertEquals( 1, results.size() );
+ Object result = results.get( 0 );
+ assertClassAssignability( HeresAnotherCrazyIdFieldName.class, result.getClass() );
+ assertSame( next, result );
+
+ results = s.createQuery( "select e.heresAnotherCrazyIdFieldName.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e where e.heresAnotherCrazyIdFieldName is not null" ).list();
+ assertEquals( 1, results.size() );
+ result = results.get( 0 );
+ assertClassAssignability( Long.class, result.getClass() );
+ assertEquals( next.getHeresAnotherCrazyIdFieldName(), result );
+
+ results = s.createQuery( "select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e" ).list();
+ assertEquals( 1, results.size() );
+ Iterator itr = s.createQuery( "select e.heresAnotherCrazyIdFieldName from MoreCrazyIdFieldNameStuffEntity e" ).iterate();
+ assertTrue( itr.hasNext() ); itr.next(); assertFalse( itr.hasNext() );
+
+ s.delete( top );
+ s.delete( next );
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testImplicitJoinsInDifferentClauses() {
+ // HHH-2257 :
+ // both the classic and ast translators output the same syntactically valid sql
+ // for all of these cases; the issue is that shallow (iterate) and
+ // non-shallow (list/scroll) queries return different results because the
+ // shallow skips the inner join which "weeds out" results from the non-shallow queries.
+ // The results were initially different depending upon the clause(s) in which the
+ // implicit join occurred
+ Session s = openSession();
+ s.beginTransaction();
+ SimpleEntityWithAssociation owner = new SimpleEntityWithAssociation( "owner" );
+ SimpleAssociatedEntity e1 = new SimpleAssociatedEntity( "thing one", owner );
+ SimpleAssociatedEntity e2 = new SimpleAssociatedEntity( "thing two" );
+ s.save( e1 );
+ s.save( e2 );
+ s.save( owner );
+ s.getTransaction().commit();
+ s.close();
+
+ checkCounts( "select e.owner from SimpleAssociatedEntity e", 1, "implicit-join in select clause" );
+ checkCounts( "select e.id, e.owner from SimpleAssociatedEntity e", 1, "implicit-join in select clause" );
+
+ // resolved to a "id short cut" when part of the order by clause -> no inner join = no weeding out...
+ checkCounts( "from SimpleAssociatedEntity e order by e.owner", 2, "implicit-join in order-by clause" );
+ // resolved to a "id short cut" when part of the group by clause -> no inner join = no weeding out...
+ checkCounts( "select e.owner.id, count(*) from SimpleAssociatedEntity e group by e.owner", 2, "implicit-join in select and group-by clauses" );
+
+ s = openSession();
+ s.beginTransaction();
+ s.delete( e1 );
+ s.delete( e2 );
+ s.delete( owner );
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ private void checkCounts(String hql, int expected, String testCondition) {
+ Session s = openSession();
+ s.beginTransaction();
+ int count = determineCount( s.createQuery( hql ).list().iterator() );
+ assertEquals( "list() [" + testCondition + "]", expected, count );
+ count = determineCount( s.createQuery( hql ).iterate() );
+ assertEquals( "iterate() [" + testCondition + "]", expected, count );
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testImplicitSelectEntityAssociationInShallowQuery() {
+ // HHH-2257 :
+ // both the classic and ast translators output the same syntactically valid sql.
+ // the issue is that shallow and non-shallow queries return different
+ // results because the shallow skips the inner join which "weeds out" results
+ // from the non-shallow queries...
+ Session s = openSession();
+ s.beginTransaction();
+ SimpleEntityWithAssociation owner = new SimpleEntityWithAssociation( "owner" );
+ SimpleAssociatedEntity e1 = new SimpleAssociatedEntity( "thing one", owner );
+ SimpleAssociatedEntity e2 = new SimpleAssociatedEntity( "thing two" );
+ s.save( e1 );
+ s.save( e2 );
+ s.save( owner );
+ s.getTransaction().commit();
+ s.close();
+
+ s = openSession();
+ s.beginTransaction();
+ int count = determineCount( s.createQuery( "select e.id, e.owner from SimpleAssociatedEntity e" ).list().iterator() );
+ assertEquals( 1, count ); // thing two would be removed from the result due to the inner join
+ count = determineCount( s.createQuery( "select e.id, e.owner from SimpleAssociatedEntity e" ).iterate() );
+ assertEquals( 1, count );
+ s.getTransaction().commit();
+ s.close();
+
+ s = openSession();
+ s.beginTransaction();
+ s.delete( e1 );
+ s.delete( e2 );
+ s.delete( owner );
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ private int determineCount(Iterator iterator) {
+ int count = 0;
+ while( iterator.hasNext() ) {
+ count++;
+ iterator.next();
+ }
+ return count;
+ }
+
+ public void testNestedComponentIsNull() {
+ // (1) From MapTest originally...
+ // (2) Was then moved into HQLTest...
+ // (3) However, a bug fix to EntityType#getIdentifierOrUniqueKeyType (HHH-2138)
+ // caused the classic parser to suddenly start throwing exceptions on
+ // this query, apparently relying on the buggy behavior somehow; thus
+ // moved here to at least get some syntax checking...
+ //
+ // fyi... found and fixed the problem in the classic parser; still
+ // leaving here for syntax checking
+ new SyntaxChecker( "from Commento c where c.marelo.commento.mcompr is null" ).checkAll();
+ }
+
+ public void testSpecialClassPropertyReference() {
+ // this is a long standing bug in Hibernate when applied to joined-subclasses;
+ // see HHH-939 for details and history
+ new SyntaxChecker( "from Zoo zoo where zoo.class = PettingZoo" ).checkAll();
+ new SyntaxChecker( "select a.description from Animal a where a.class = Mammal" ).checkAll();
+ new SyntaxChecker( "select a.class from Animal a" ).checkAll();
+ new SyntaxChecker( "from DomesticAnimal an where an.class = Dog" ).checkAll();
+ new SyntaxChecker( "from Animal an where an.class = Dog" ).checkAll();
+ }
+
+ public void testSpecialClassPropertyReferenceFQN() {
+ // tests relating to HHH-2376
+ new SyntaxChecker( "from Zoo zoo where zoo.class = org.hibernate.test.hql.PettingZoo" ).checkAll();
+ new SyntaxChecker( "select a.description from Animal a where a.class = org.hibernate.test.hql.Mammal" ).checkAll();
+ new SyntaxChecker( "from DomesticAnimal an where an.class = org.hibernate.test.hql.Dog" ).checkAll();
+ new SyntaxChecker( "from Animal an where an.class = org.hibernate.test.hql.Dog" ).checkAll();
+ }
+
+ public void testSubclassOrSuperclassPropertyReferenceInJoinedSubclass() {
+ // this is a long standing bug in Hibernate; see HHH-1631 for details and history
+ //
+ // (1) pregnant is defined as a property of the class (Mammal) itself
+ // (2) description is defined as a property of the superclass (Animal)
+ // (3) name is defined as a property of a particular subclass (Human)
+
+ new SyntaxChecker( "from Zoo z join z.mammals as m where m.name.first = 'John'" ).checkIterate();
+
+ new SyntaxChecker( "from Zoo z join z.mammals as m where m.pregnant = false" ).checkAll();
+ new SyntaxChecker( "select m.pregnant from Zoo z join z.mammals as m where m.pregnant = false" ).checkAll();
+
+ new SyntaxChecker( "from Zoo z join z.mammals as m where m.description = 'tabby'" ).checkAll();
+ new SyntaxChecker( "select m.description from Zoo z join z.mammals as m where m.description = 'tabby'" ).checkAll();
+
+ new SyntaxChecker( "from Zoo z join z.mammals as m where m.name.first = 'John'" ).checkAll();
+ new SyntaxChecker( "select m.name from Zoo z join z.mammals as m where m.name.first = 'John'" ).checkAll();
+
+ new SyntaxChecker( "select m.pregnant from Zoo z join z.mammals as m" ).checkAll();
+ new SyntaxChecker( "select m.description from Zoo z join z.mammals as m" ).checkAll();
+ new SyntaxChecker( "select m.name from Zoo z join z.mammals as m" ).checkAll();
+
+ new SyntaxChecker( "from DomesticAnimal da join da.owner as o where o.nickName = 'Gavin'" ).checkAll();
+ new SyntaxChecker( "select da.father from DomesticAnimal da join da.owner as o where o.nickName = 'Gavin'" ).checkAll();
+ }
+
+ public void testSimpleSelectWithLimitAndOffset() throws Exception {
+ if ( ! ( getDialect().supportsLimit() && getDialect().supportsLimitOffset() ) ) {
+ reportSkip( "dialect does not support offset and limit combo", "limit and offset combination" );
+ return;
+ }
+
+ // just checking correctness of param binding code...
+ Session session = openSession();
+ session.createQuery( "from Animal" )
+ .setFirstResult( 2 )
+ .setMaxResults( 1 )
+ .list();
+ session.close();
+ }
+
+ public void testJPAPositionalParameterList() {
+ Session s = openSession();
+ s.beginTransaction();
+ ArrayList params = new ArrayList();
+ params.add( "Doe" );
+ params.add( "Public" );
+ s.createQuery( "from Human where name.last in (?1)" )
+ .setParameterList( "1", params )
+ .list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testComponentQueries() {
+ Session s = openSession();
+ s.beginTransaction();
+
+ Type[] types = s.createQuery( "select h.name from Human h" ).getReturnTypes();
+ assertEquals( 1, types.length );
+ assertTrue( types[0] instanceof ComponentType );
+
+ // Test the ability to perform comparisions between component values
+ s.createQuery( "from Human h where h.name = h.name" ).list();
+ s.createQuery( "from Human h where h.name = :name" ).setParameter( "name", new Name() ).list();
+ s.createQuery( "from Human where name = :name" ).setParameter( "name", new Name() ).list();
+ s.createQuery( "from Human h where :name = h.name" ).setParameter( "name", new Name() ).list();
+ s.createQuery( "from Human h where :name <> h.name" ).setParameter( "name", new Name() ).list();
+
+ // Test the ability to perform comparisions between a component and an explicit row-value
+ s.createQuery( "from Human h where h.name = ('John', 'X', 'Doe')" ).list();
+ s.createQuery( "from Human h where ('John', 'X', 'Doe') = h.name" ).list();
+ s.createQuery( "from Human h where ('John', 'X', 'Doe') <> h.name" ).list();
+ s.createQuery( "from Human h where ('John', 'X', 'Doe') >= h.name" ).list();
+
+ s.createQuery( "from Human h order by h.name" ).list();
+
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testComponentParameterBinding() {
+ // HHH-1774 : parameters are bound incorrectly with component parameters...
+ Session s = openSession();
+ s.beginTransaction();
+
+ Order.Id oId = new Order.Id( "1234", 1 );
+
+ // control
+ s.createQuery("from Order o where o.customer.name =:name and o.id = :id")
+ .setParameter( "name", "oracle" )
+ .setParameter( "id", oId )
+ .list();
+
+ // this is the form that caused problems in the original case...
+ s.createQuery("from Order o where o.id = :id and o.customer.name =:name ")
+ .setParameter( "id", oId )
+ .setParameter( "name", "oracle" )
+ .list();
+
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testAnyMappingReference() {
+ Session s = openSession();
+ s.beginTransaction();
+
+ PropertyValue redValue = new StringPropertyValue( "red" );
+ PropertyValue lonliestNumberValue = new IntegerPropertyValue( 1 );
+
+ Long id;
+ PropertySet ps = new PropertySet( "my properties" );
+ ps.setSomeSpecificProperty( redValue );
+ ps.getGeneralProperties().put( "the lonliest number", lonliestNumberValue );
+ ps.getGeneralProperties().put( "i like", new StringPropertyValue( "pina coladas" ) );
+ ps.getGeneralProperties().put( "i also like", new StringPropertyValue( "getting caught in the rain" ) );
+ s.save( ps );
+
+ s.getTransaction().commit();
+ id = ps.getId();
+ s.clear();
+ s.beginTransaction();
+
+ // TODO : setEntity() currently will not work here, but that would be *very* nice
+ // does not work because the corresponding EntityType is then used as the "bind type" rather
+ // than the "discovered" AnyType...
+ s.createQuery( "from PropertySet p where p.someSpecificProperty = :ssp" ).setParameter( "ssp", redValue ).list();
+
+ s.createQuery( "from PropertySet p where p.someSpecificProperty.id is not null" ).list();
+
+ s.createQuery( "from PropertySet p join p.generalProperties gp where gp.id is not null" ).list();
+
+ s.delete( s.load( PropertySet.class, id ) );
+
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testJdkEnumStyleEnumConstant() throws Exception {
+ Session s = openSession();
+ s.beginTransaction();
+
+ s.createQuery( "from Zoo z where z.classification = org.hibernate.test.hql.Classification.LAME" ).list();
+
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testParameterTypeMismatchFailureExpected() {
+ Session s = openSession();
+ s.beginTransaction();
+
+ Query query = s.createQuery( "from Animal a where a.description = :nonstring" )
+ .setParameter( "nonstring", new Integer(1) );
+ try {
+ query.list();
+ fail( "query execution should have failed" );
+ }
+ catch( TypeMismatchException tme ) {
+ // expected behavior
+ }
+
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testMultipleBagFetchesFail() {
+ Session s = openSession();
+ s.beginTransaction();
+ try {
+ s.createQuery( "from Human h join fetch h.friends f join fetch f.friends fof" ).list();
+ fail( "failure expected" );
+ }
+ catch( HibernateException e ) {
+ assertTrue( "unexpected failure reason : " + e, e.getMessage().indexOf( "multiple bags" ) > 0 );
+ }
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testCollectionJoinsInSubselect() {
+ // HHH-1248 : initially FromElementFactory treated any explicit join
+ // as an implied join so that theta-style joins would always be used.
+ // This was because correlated subqueries cannot use ANSI-style joins
+ // for the correlation. However, this special treatment was not limited
+ // to only correlated subqueries; it was applied to any subqueries ->
+ // which in-and-of-itself is not necessarily bad. But somewhere later
+ // the choices made there caused joins to be dropped.
+ Session s = openSession();
+ String qryString =
+ "select a.id, a.description" +
+ " from Animal a" +
+ " left join a.offspring" +
+ " where a in (" +
+ " select a1 from Animal a1" +
+ " left join a1.offspring o" +
+ " where a1.id=1" +
+ ")";
+ s.createQuery( qryString ).list();
+ qryString =
+ "select h.id, h.description" +
+ " from Human h" +
+ " left join h.friends" +
+ " where h in (" +
+ " select h1" +
+ " from Human h1" +
+ " left join h1.friends f" +
+ " where h1.id=1" +
+ ")";
+ s.createQuery( qryString ).list();
+ qryString =
+ "select h.id, h.description" +
+ " from Human h" +
+ " left join h.friends f" +
+ " where f in (" +
+ " select h1" +
+ " from Human h1" +
+ " left join h1.friends f1" +
+ " where h = f1" +
+ ")";
+ s.createQuery( qryString ).list();
+ s.close();
+ }
+
+ public void testCollectionFetchWithDistinctionAndLimit() {
+ // create some test data...
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ int parentCount = 30;
+ for ( int i = 0; i < parentCount; i++ ) {
+ Animal child1 = new Animal();
+ child1.setDescription( "collection fetch distinction (child1 - parent" + i + ")" );
+ s.persist( child1 );
+ Animal child2 = new Animal();
+ child2.setDescription( "collection fetch distinction (child2 - parent " + i + ")" );
+ s.persist( child2 );
+ Animal parent = new Animal();
+ parent.setDescription( "collection fetch distinction (parent" + i + ")" );
+ parent.setSerialNumber( "123-" + i );
+ parent.addOffspring( child1 );
+ parent.addOffspring( child2 );
+ s.persist( parent );
+ }
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ // Test simple distinction
+ List results;
+ results = s.createQuery( "select distinct p from Animal p inner join fetch p.offspring" ).list();
+ assertEquals( "duplicate list() returns", 30, results.size() );
+ // Test first/max
+ results = s.createQuery( "select p from Animal p inner join fetch p.offspring order by p.id" )
+ .setFirstResult( 5 )
+ .setMaxResults( 20 )
+ .list();
+ assertEquals( "duplicate returns", 20, results.size() );
+ Animal firstReturn = ( Animal ) results.get( 0 );
+ assertEquals( "firstResult not applied correctly", "123-5", firstReturn.getSerialNumber() );
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.createQuery( "delete Animal where mother is not null" ).executeUpdate();
+ s.createQuery( "delete Animal" ).executeUpdate();
+ t.commit();
+ s.close();
+ }
+
+ public void testFetchInSubqueryFails() {
+ Session s = openSession();
+ try {
+ s.createQuery( "from Animal a where a.mother in (select m from Animal a1 inner join a1.mother as m join fetch m.mother)" ).list();
+ fail( "fetch join allowed in subquery" );
+ }
+ catch( QueryException expected ) {
+ // expected behavior
+ }
+ s.close();
+ }
+
+ public void testQueryMetadataRetrievalWithFetching() {
+ // HHH-1464 : there was a problem due to the fact they we polled
+ // the shallow version of the query plan to get the metadata.
+ Session s = openSession();
+ Query query = s.createQuery( "from Animal a inner join fetch a.mother" );
+ assertEquals( 1, query.getReturnTypes().length );
+ assertNull( query.getReturnAliases() );
+ s.close();
+ }
+
+ public void testSuperclassPropertyReferenceAfterCollectionIndexedAccess() {
+ // note: simply performing syntax checking in the db
+ // test for HHH-429
+ Session s = openSession();
+ s.beginTransaction();
+ Mammal tiger = new Mammal();
+ tiger.setDescription( "Tiger" );
+ s.persist( tiger );
+ Mammal mother = new Mammal();
+ mother.setDescription( "Tiger's mother" );
+ mother.setBodyWeight( 4.0f );
+ mother.addOffspring( tiger );
+ s.persist( mother );
+ Zoo zoo = new Zoo();
+ zoo.setName( "Austin Zoo" );
+ zoo.setMammals( new HashMap() );
+ zoo.getMammals().put( "tiger", tiger );
+ s.persist( zoo );
+ s.getTransaction().commit();
+ s.close();
+
+ s = openSession();
+ s.beginTransaction();
+ List results = s.createQuery( "from Zoo zoo where zoo.mammals['tiger'].mother.bodyWeight > 3.0f" ).list();
+ assertEquals( 1, results.size() );
+ s.getTransaction().commit();
+ s.close();
+
+ s = openSession();
+ s.beginTransaction();
+ s.delete( tiger );
+ s.delete( mother );
+ s.delete( zoo );
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testJoinFetchCollectionOfValues() {
+ // note: simply performing syntax checking in the db
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "select h from Human as h join fetch h.nickNames" ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testIntegerLiterals() {
+ // note: simply performing syntax checking in the db
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Foo where long = 1" ).list();
+ s.createQuery( "from Foo where long = " + Integer.MIN_VALUE ).list();
+ s.createQuery( "from Foo where long = " + Integer.MAX_VALUE ).list();
+ s.createQuery( "from Foo where long = 1L" ).list();
+ s.createQuery( "from Foo where long = " + (Long.MIN_VALUE + 1) + "L" ).list();
+ s.createQuery( "from Foo where long = " + Long.MAX_VALUE + "L" ).list();
+ s.createQuery( "from Foo where integer = " + (Long.MIN_VALUE + 1) ).list();
+// currently fails due to HHH-1387
+// s.createQuery( "from Foo where long = " + Long.MIN_VALUE ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testDecimalLiterals() {
+ // note: simply performing syntax checking in the db
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Animal where bodyWeight > 100.0e-10" ).list();
+ s.createQuery( "from Animal where bodyWeight > 100.0E-10" ).list();
+ s.createQuery( "from Animal where bodyWeight > 100.001f" ).list();
+ s.createQuery( "from Animal where bodyWeight > 100.001F" ).list();
+ s.createQuery( "from Animal where bodyWeight > 100.001d" ).list();
+ s.createQuery( "from Animal where bodyWeight > 100.001D" ).list();
+ s.createQuery( "from Animal where bodyWeight > .001f" ).list();
+ s.createQuery( "from Animal where bodyWeight > 100e-10" ).list();
+ s.createQuery( "from Animal where bodyWeight > .01E-10" ).list();
+ s.createQuery( "from Animal where bodyWeight > 1e-38" ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testNakedPropertyRef() {
+ // note: simply performing syntax and column/table resolution checking in the db
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Animal where bodyWeight = bodyWeight" ).list();
+ s.createQuery( "select bodyWeight from Animal" ).list();
+ s.createQuery( "select max(bodyWeight) from Animal" ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testNakedComponentPropertyRef() {
+ // note: simply performing syntax and column/table resolution checking in the db
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Human where name.first = 'Gavin'" ).list();
+ s.createQuery( "select name from Human" ).list();
+ s.createQuery( "select upper(h.name.first) from Human as h" ).list();
+ s.createQuery( "select upper(name.first) from Human" ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testNakedImplicitJoins() {
+ // note: simply performing syntax and column/table resolution checking in the db
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Animal where mother.father.id = 1" ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testNakedEntityAssociationReference() {
+ // note: simply performing syntax and column/table resolution checking in the db
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Animal where mother = :mother" ).setParameter( "mother", null ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testNakedMapIndex() throws Exception {
+ // note: simply performing syntax and column/table resolution checking in the db
+ Session s = openSession();
+ s.beginTransaction();
+ s.createQuery( "from Zoo where mammals['dog'].description like '%black%'" ).list();
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testInvalidFetchSemantics() {
+ Session s = openSession();
+ s.beginTransaction();
+
+ try {
+ s.createQuery( "select mother from Human a left join fetch a.mother mother" ).list();
+ fail( "invalid fetch semantic allowed!" );
+ }
+ catch( QueryException e ) {
+ }
+
+ try {
+ s.createQuery( "select mother from Human a left join fetch a.mother mother" ).list();
+ fail( "invalid fetch semantic allowed!" );
+ }
+ catch( QueryException e ) {
+ }
+
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testArithmetic() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Zoo zoo = new Zoo();
+ zoo.setName("Melbourne Zoo");
+ s.persist(zoo);
+ s.createQuery("select 2*2*2*2*(2*2) from Zoo").uniqueResult();
+ s.createQuery("select 2 / (1+1) from Zoo").uniqueResult();
+ int result0 = ( (Integer) s.createQuery("select 2 - (1+1) from Zoo").uniqueResult() ).intValue();
+ int result1 = ( (Integer) s.createQuery("select 2 - 1 + 1 from Zoo").uniqueResult() ).intValue();
+ int result2 = ( (Integer) s.createQuery("select 2 * (1-1) from Zoo").uniqueResult() ).intValue();
+ int result3 = ( (Integer) s.createQuery("select 4 / (2 * 2) from Zoo").uniqueResult() ).intValue();
+ int result4 = ( (Integer) s.createQuery("select 4 / 2 * 2 from Zoo").uniqueResult() ).intValue();
+ int result5 = ( (Integer) s.createQuery("select 2 * (2/2) from Zoo").uniqueResult() ).intValue();
+ int result6 = ( (Integer) s.createQuery("select 2 * (2/2+1) from Zoo").uniqueResult() ).intValue();
+ assertEquals(result0, 0);
+ assertEquals(result1, 2);
+ assertEquals(result2, 0);
+ assertEquals(result3, 1);
+ assertEquals(result4, 4);
+ assertEquals(result5, 2);
+ assertEquals(result6, 4);
+ s.delete(zoo);
+ t.commit();
+ s.close();
+ }
+
+ public void testNestedCollectionFetch() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ s.createQuery("from Animal a left join fetch a.offspring o left join fetch o.offspring where a.mother.id = 1 order by a.description").list();
+ s.createQuery("from Zoo z left join fetch z.animals a left join fetch a.offspring where z.name ='MZ' order by a.description").list();
+ s.createQuery("from Human h left join fetch h.pets a left join fetch a.offspring where h.name.first ='Gavin' order by a.description").list();
+ t.commit();
+ s.close();
+ }
+
+ public void testSelectClauseSubselect() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Zoo zoo = new Zoo();
+ zoo.setName("Melbourne Zoo");
+ zoo.setMammals( new HashMap() );
+ zoo.setAnimals( new HashMap() );
+ Mammal plat = new Mammal();
+ plat.setBodyWeight( 11f );
+ plat.setDescription( "Platypus" );
+ plat.setZoo(zoo);
+ plat.setSerialNumber("plat123");
+ zoo.getMammals().put("Platypus", plat);
+ zoo.getAnimals().put("plat123", plat);
+ s.persist( plat );
+ s.persist(zoo);
+
+ s.createQuery("select (select max(z.id) from a.zoo z) from Animal a").list();
+ s.createQuery("select (select max(z.id) from a.zoo z where z.name=:name) from Animal a")
+ .setParameter("name", "Melbourne Zoo").list();
+
+ s.delete(plat);
+ s.delete(zoo);
+ t.commit();
+ s.close();
+ }
+
+ public void testInitProxy() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Mammal plat = new Mammal();
+ plat.setBodyWeight( 11f );
+ plat.setDescription( "Platypus" );
+ s.persist( plat );
+ s.flush();
+ s.clear();
+ plat = (Mammal) s.load(Mammal.class, plat.getId() );
+ assertFalse( Hibernate.isInitialized(plat) );
+ Object plat2 = s.createQuery("from Animal a").uniqueResult();
+ assertSame(plat, plat2);
+ assertTrue( Hibernate.isInitialized(plat) );
+ s.delete(plat);
+ t.commit();
+ s.close();
+ }
+
+ public void testSelectClauseImplicitJoin() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Zoo zoo = new Zoo();
+ zoo.setName("The Zoo");
+ zoo.setMammals( new HashMap() );
+ zoo.setAnimals( new HashMap() );
+ Mammal plat = new Mammal();
+ plat.setBodyWeight( 11f );
+ plat.setDescription( "Platypus" );
+ plat.setZoo(zoo);
+ plat.setSerialNumber("plat123");
+ zoo.getMammals().put("Platypus", plat);
+ zoo.getAnimals().put("plat123", plat);
+ s.persist( plat );
+ s.persist(zoo);
+ s.flush();
+ s.clear();
+ Query q = s.createQuery("select distinct a.zoo from Animal a where a.zoo is not null");
+ Type type = q.getReturnTypes()[0];
+ assertTrue( type instanceof ManyToOneType );
+ assertEquals( ( (ManyToOneType) type ).getAssociatedEntityName(), "org.hibernate.test.hql.Zoo" );
+ zoo = (Zoo) q.list().get(0);
+ assertEquals( zoo.getMammals().size(), 1 );
+ assertEquals( zoo.getAnimals().size(), 1 );
+ s.clear();
+ s.delete(plat);
+ s.delete(zoo);
+ t.commit();
+ s.close();
+ }
+
+ public void testSelectClauseImplicitJoinWithIterate() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Zoo zoo = new Zoo();
+ zoo.setName("The Zoo");
+ zoo.setMammals( new HashMap() );
+ zoo.setAnimals( new HashMap() );
+ Mammal plat = new Mammal();
+ plat.setBodyWeight( 11f );
+ plat.setDescription( "Platypus" );
+ plat.setZoo(zoo);
+ plat.setSerialNumber("plat123");
+ zoo.getMammals().put("Platypus", plat);
+ zoo.getAnimals().put("plat123", plat);
+ s.persist( plat );
+ s.persist(zoo);
+ s.flush();
+ s.clear();
+ Query q = s.createQuery("select distinct a.zoo from Animal a where a.zoo is not null");
+ Type type = q.getReturnTypes()[0];
+ assertTrue( type instanceof ManyToOneType );
+ assertEquals( ( (ManyToOneType) type ).getAssociatedEntityName(), "org.hibernate.test.hql.Zoo" );
+ zoo = (Zoo) q
+ .iterate().next();
+ assertEquals( zoo.getMammals().size(), 1 );
+ assertEquals( zoo.getAnimals().size(), 1 );
+ s.clear();
+ s.delete(plat);
+ s.delete(zoo);
+ t.commit();
+ s.close();
+ }
+
+ public void testComponentOrderBy() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ Long id1 = ( Long ) s.save( genSimpleHuman( "John", "Jacob" ) );
+ Long id2 = ( Long ) s.save( genSimpleHuman( "Jingleheimer", "Schmidt" ) );
+
+ s.flush();
+
+ // the component is defined with the firstName column first...
+ List results = s.createQuery( "from Human as h order by h.name" ).list();
+ assertEquals( "Incorrect return count", 2, results.size() );
+
+ Human h1 = ( Human ) results.get( 0 );
+ Human h2 = ( Human ) results.get( 1 );
+
+ assertEquals( "Incorrect ordering", id2, h1.getId() );
+ assertEquals( "Incorrect ordering", id1, h2.getId() );
+
+ s.delete( h1 );
+ s.delete( h2 );
+
+ t.commit();
+ s.close();
+ }
+
+ private Human genSimpleHuman(String fName, String lName) {
+ Human h = new Human();
+ h.setName( new Name( fName, 'X', lName ) );
+
+ return h;
+ }
+
+ public void testCastInSelect() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Animal a = new Animal();
+ a.setBodyWeight(12.4f);
+ a.setDescription("an animal");
+ s.persist(a);
+ Integer bw = (Integer) s.createQuery("select cast(bodyWeight as integer) from Animal").uniqueResult();
+ bw = (Integer) s.createQuery("select cast(a.bodyWeight as integer) from Animal a").uniqueResult();
+ bw.toString();
+ s.delete(a);
+ t.commit();
+ s.close();
+ }
+
+ public void testAliases() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Animal a = new Animal();
+ a.setBodyWeight(12.4f);
+ a.setDescription("an animal");
+ s.persist(a);
+ String[] aliases1 = s.createQuery("select a.bodyWeight as abw, a.description from Animal a").getReturnAliases();
+ assertEquals(aliases1[0], "abw");
+ assertEquals(aliases1[1], "1");
+ String[] aliases2 = s.createQuery("select count(*), avg(a.bodyWeight) as avg from Animal a").getReturnAliases();
+ assertEquals(aliases2[0], "0");
+ assertEquals(aliases2[1], "avg");
+ s.delete(a);
+ t.commit();
+ s.close();
+ }
+
+ public void testParameterMixing() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ s.createQuery( "from Animal a where a.description = ? and a.bodyWeight = ? or a.bodyWeight = :bw" )
+ .setString( 0, "something" )
+ .setFloat( 1, 12345f )
+ .setFloat( "bw", 123f )
+ .list();
+ t.commit();
+ s.close();
+ }
+
+ public void testOrdinalParameters() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ s.createQuery( "from Animal a where a.description = ? and a.bodyWeight = ?" )
+ .setString( 0, "something" )
+ .setFloat( 1, 123f )
+ .list();
+ s.createQuery( "from Animal a where a.bodyWeight in (?, ?)" )
+ .setFloat( 0, 999f )
+ .setFloat( 1, 123f )
+ .list();
+ t.commit();
+ s.close();
+ }
+
+ public void testIndexParams() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ s.createQuery("from Zoo zoo where zoo.mammals[:name] = :id")
+ .setParameter("name", "Walrus")
+ .setParameter("id", new Long(123))
+ .list();
+ s.createQuery("from Zoo zoo where zoo.mammals[:name].bodyWeight > :w")
+ .setParameter("name", "Walrus")
+ .setParameter("w", new Float(123.32))
+ .list();
+ s.createQuery("from Zoo zoo where zoo.animals[:sn].mother.bodyWeight < :mw")
+ .setParameter("sn", "ant-123")
+ .setParameter("mw", new Float(23.32))
+ .list();
+ /*s.createQuery("from Zoo zoo where zoo.animals[:sn].description like :desc and zoo.animals[:sn].bodyWeight > :wmin and zoo.animals[:sn].bodyWeight < :wmax")
+ .setParameter("sn", "ant-123")
+ .setParameter("desc", "%big%")
+ .setParameter("wmin", new Float(123.32))
+ .setParameter("wmax", new Float(167.89))
+ .list();*/
+ /*s.createQuery("from Human where addresses[:type].city = :city and addresses[:type].country = :country")
+ .setParameter("type", "home")
+ .setParameter("city", "Melbourne")
+ .setParameter("country", "Australia")
+ .list();*/
+ t.commit();
+ s.close();
+ }
+
+ public void testAggregation() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Human h = new Human();
+ h.setBodyWeight( (float) 74.0 );
+ h.setHeight(120.5);
+ h.setDescription("Me");
+ h.setName( new Name("Gavin", 'A', "King") );
+ h.setNickName("Oney");
+ s.persist(h);
+ Double sum = (Double) s.createQuery("select sum(h.bodyWeight) from Human h").uniqueResult();
+ Double avg = (Double) s.createQuery("select avg(h.height) from Human h").uniqueResult();
+ assertEquals(sum.floatValue(), 74.0, 0.01);
+ assertEquals(avg.doubleValue(), 120.5, 0.01);
+ Long id = (Long) s.createQuery("select max(a.id) from Animal a").uniqueResult();
+ s.delete(h);
+ t.commit();
+ s.close();
+ }
+
+ public void testSelectClauseCase() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Human h = new Human();
+ h.setBodyWeight( (float) 74.0 );
+ h.setHeight(120.5);
+ h.setDescription("Me");
+ h.setName( new Name("Gavin", 'A', "King") );
+ h.setNickName("Oney");
+ s.persist(h);
+ String name = (String) s.createQuery("select case nickName when 'Oney' then 'gavin' when 'Turin' then 'christian' else nickName end from Human").uniqueResult();
+ assertEquals(name, "gavin");
+ String result = (String) s.createQuery("select case when bodyWeight > 100 then 'fat' else 'skinny' end from Human").uniqueResult();
+ assertEquals(result, "skinny");
+ s.delete(h);
+ t.commit();
+ s.close();
+ }
+
+ public void testImplicitPolymorphism() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ Product product = new Product();
+ product.setDescription( "My Product" );
+ product.setNumberAvailable( 10 );
+ product.setPrice( new BigDecimal( 123 ) );
+ product.setProductId( "4321" );
+ s.save( product );
+
+ List list = s.createQuery("from java.lang.Comparable").list();
+ assertEquals( list.size(), 0 );
+
+ list = s.createQuery("from java.lang.Object").list();
+ assertEquals( list.size(), 1 );
+
+ s.delete(product);
+
+ list = s.createQuery("from java.lang.Object").list();
+ assertEquals( list.size(), 0 );
+
+ t.commit();
+ s.close();
+ }
+
+ public void testCoalesce() {
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+ session.createQuery("from Human h where coalesce(h.nickName, h.name.first, h.name.last) = 'max'").list();
+ session.createQuery("select nullif(nickName, '1e1') from Human").list();
+ txn.commit();
+ session.close();
+ }
+
+ public void testStr() {
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+ Animal an = new Animal();
+ an.setBodyWeight(123.45f);
+ session.persist(an);
+ String str = (String) session.createQuery("select str(an.bodyWeight) from Animal an where str(an.bodyWeight) like '123%' or str(an.bodyWeight) like '1.23%'").uniqueResult();
+ if ( getDialect() instanceof DB2Dialect ) {
+ assertTrue( str.startsWith("1.234") );
+ }
+ else if ( getDialect() instanceof SQLServerDialect ) {
+ // no assertion as SQLServer always returns nulls here; even trying directly against the
+ // database, it seems to have problems with str() in the where clause...
+ }
+ else {
+ assertTrue( str.startsWith("123.4") );
+ }
+ if ( ! ( getDialect() instanceof SybaseDialect ) ) {
+ // In TransactSQL (the variant spoken by Sybase and SQLServer), the str() function
+ // is explicitly intended for numeric values only...
+ String dateStr1 = (String) session.createQuery("select str(current_date) from Animal").uniqueResult();
+ String dateStr2 = (String) session.createQuery("select str(year(current_date))||'-'||str(month(current_date))||'-'||str(day(current_date)) from Animal").uniqueResult();
+ System.out.println(dateStr1 + '=' + dateStr2);
+ if ( ! ( getDialect() instanceof Oracle9Dialect || getDialect() instanceof Oracle8iDialect ) ) { //Oracle renders the name of the month :(
+ String[] dp1 = StringHelper.split("-", dateStr1);
+ String[] dp2 = StringHelper.split("-", dateStr2);
+ for (int i=0; i<3; i++) {
+ if ( dp1[i].startsWith( "0" ) ) {
+ dp1[i] = dp1[i].substring( 1 );
+ }
+ assertEquals( dp1[i], dp2[i] );
+ }
+ }
+ }
+ session.delete(an);
+ txn.commit();
+ session.close();
+ }
+
+ public void testCast() {
+ if ( ( getDialect() instanceof MySQLDialect ) || ( getDialect() instanceof DB2Dialect ) ) {
+ return;
+ }
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+ session.createQuery("from Human h where h.nickName like 'G%'").list();
+ session.createQuery("from Animal a where cast(a.bodyWeight as string) like '1.%'").list();
+ session.createQuery("from Animal a where cast(a.bodyWeight as integer) = 1").list();
+ txn.commit();
+ session.close();
+ }
+
+ public void testExtract() {
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+ session.createQuery("select second(current_timestamp()), minute(current_timestamp()), hour(current_timestamp()) from Mammal m").list();
+ session.createQuery("select day(m.birthdate), month(m.birthdate), year(m.birthdate) from Mammal m").list();
+ if ( !(getDialect() instanceof DB2Dialect) ) { //no ANSI extract
+ session.createQuery("select extract(second from current_timestamp()), extract(minute from current_timestamp()), extract(hour from current_timestamp()) from Mammal m").list();
+ session.createQuery("select extract(day from m.birthdate), extract(month from m.birthdate), extract(year from m.birthdate) from Mammal m").list();
+ }
+ txn.commit();
+ session.close();
+ }
+
+ public void testOneToManyFilter() throws Throwable {
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+
+ Product product = new Product();
+ product.setDescription( "My Product" );
+ product.setNumberAvailable( 10 );
+ product.setPrice( new BigDecimal( 123 ) );
+ product.setProductId( "4321" );
+ session.save( product );
+
+ Customer customer = new Customer();
+ customer.setCustomerId( "123456789" );
+ customer.setName( "My customer" );
+ customer.setAddress( "somewhere" );
+ session.save( customer );
+
+ Order order = customer.generateNewOrder( new BigDecimal( 1234 ) );
+ session.save( order );
+
+ LineItem li = order.generateLineItem( product, 5 );
+ session.save( li );
+
+ session.flush();
+
+ assertEquals( session.createFilter( customer.getOrders(), "" ).list().size(), 1 );
+
+ assertEquals( session.createFilter( order.getLineItems(), "" ).list().size(), 1 );
+ assertEquals( session.createFilter( order.getLineItems(), "where this.quantity > :quantity" ).setInteger( "quantity", 5 ).list().size(), 0 );
+
+ session.delete(li);
+ session.delete(order);
+ session.delete(product);
+ session.delete(customer);
+ txn.commit();
+ session.close();
+ }
+
+ public void testManyToManyFilter() throws Throwable {
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+
+ Human human = new Human();
+ human.setName( new Name( "Steve", 'L', "Ebersole" ) );
+ session.save( human );
+
+ Human friend = new Human();
+ friend.setName( new Name( "John", 'Q', "Doe" ) );
+ friend.setBodyWeight( 11.0f );
+ session.save( friend );
+
+ human.setFriends( new ArrayList() );
+ friend.setFriends( new ArrayList() );
+ human.getFriends().add( friend );
+ friend.getFriends().add( human );
+
+ session.flush();
+
+ assertEquals( session.createFilter( human.getFriends(), "" ).list().size(), 1 );
+ assertEquals( session.createFilter( human.getFriends(), "where this.bodyWeight > ?" ).setFloat( 0, 10f ).list().size(), 1 );
+ assertEquals( session.createFilter( human.getFriends(), "where this.bodyWeight < ?" ).setFloat( 0, 10f ).list().size(), 0 );
+
+ session.delete(human);
+ session.delete(friend);
+
+ txn.commit();
+ session.close();
+ }
+
+ public void testSelectExpressions() {
+ createTestBaseData();
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+ Human h = new Human();
+ h.setName( new Name("Gavin", 'A', "King") );
+ h.setNickName("Oney");
+ h.setBodyWeight(1.0f);
+ session.persist(h);
+ List results = session.createQuery("select 'found', lower(h.name.first) from Human h where lower(h.name.first) = 'gavin'").list();
+ results = session.createQuery("select 'found', lower(h.name.first) from Human h where concat(h.name.first, ' ', h.name.initial, ' ', h.name.last) = 'Gavin A King'").list();
+ results = session.createQuery("select 'found', lower(h.name.first) from Human h where h.name.first||' '||h.name.initial||' '||h.name.last = 'Gavin A King'").list();
+ results = session.createQuery("select a.bodyWeight + m.bodyWeight from Animal a join a.mother m").list();
+ results = session.createQuery("select 2.0 * (a.bodyWeight + m.bodyWeight) from Animal a join a.mother m").list();
+ results = session.createQuery("select sum(a.bodyWeight + m.bodyWeight) from Animal a join a.mother m").list();
+ results = session.createQuery("select sum(a.mother.bodyWeight * 2.0) from Animal a").list();
+ results = session.createQuery("select concat(h.name.first, ' ', h.name.initial, ' ', h.name.last) from Human h").list();
+ results = session.createQuery("select h.name.first||' '||h.name.initial||' '||h.name.last from Human h").list();
+ results = session.createQuery("select nickName from Human").list();
+ results = session.createQuery("select lower(nickName) from Human").list();
+ results = session.createQuery("select abs(bodyWeight*-1) from Human").list();
+ results = session.createQuery("select upper(h.name.first||' ('||h.nickName||')') from Human h").list();
+ results = session.createQuery("select abs(a.bodyWeight-:param) from Animal a").setParameter("param", new Float(2.0)).list();
+ results = session.createQuery("select abs(:param - a.bodyWeight) from Animal a").setParameter("param", new Float(2.0)).list();
+ results = session.createQuery("select lower(upper('foo')) from Animal").list();
+ results = session.createQuery("select lower(upper('foo') || upper('bar')) from Animal").list();
+ results = session.createQuery("select sum(abs(bodyWeight - 1.0) * abs(length('ffobar')-3)) from Animal").list();
+ session.delete(h);
+ txn.commit();
+ session.close();
+ destroyTestBaseData();
+ }
+
+ private void createTestBaseData() {
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+
+ Mammal m1 = new Mammal();
+ m1.setBodyWeight( 11f );
+ m1.setDescription( "Mammal #1" );
+
+ session.save( m1 );
+
+ Mammal m2 = new Mammal();
+ m2.setBodyWeight( 9f );
+ m2.setDescription( "Mammal #2" );
+ m2.setMother( m1 );
+
+ session.save( m2 );
+
+ txn.commit();
+ session.close();
+
+ createdAnimalIds.add( m1.getId() );
+ createdAnimalIds.add( m2.getId() );
+ }
+
+ private void destroyTestBaseData() {
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+
+ for ( int i = 0; i < createdAnimalIds.size(); i++ ) {
+ Animal animal = ( Animal ) session.load( Animal.class, ( Long ) createdAnimalIds.get( i ) );
+ session.delete( animal );
+ }
+
+ txn.commit();
+ session.close();
+ }
+
+ public void testImplicitJoin() throws Exception {
+ Session session = openSession();
+ Transaction t = session.beginTransaction();
+ Animal a = new Animal();
+ a.setBodyWeight(0.5f);
+ a.setBodyWeight(1.5f);
+ Animal b = new Animal();
+ Animal mother = new Animal();
+ mother.setBodyWeight(10.0f);
+ mother.addOffspring(a);
+ mother.addOffspring(b);
+ session.persist(a);
+ session.persist(b);
+ session.persist(mother);
+ List list = session.createQuery("from Animal a where a.mother.bodyWeight < 2.0 or a.mother.bodyWeight > 9.0").list();
+ assertEquals( list.size(), 2 );
+ list = session.createQuery("from Animal a where a.mother.bodyWeight > 2.0 and a.mother.bodyWeight > 9.0").list();
+ assertEquals( list.size(), 2 );
+ session.delete(b);
+ session.delete(a);
+ session.delete(mother);
+ t.commit();
+ session.close();
+ }
+
+ public void testFromOnly() throws Exception {
+
+ createTestBaseData();
+
+ Session session = openSession();
+
+ List results = session.createQuery( "from Animal" ).list();
+ assertEquals( "Incorrect result size", 2, results.size() );
+ assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testSimpleSelect() throws Exception {
+
+ createTestBaseData();
+
+ Session session = openSession();
+
+ List results = session.createQuery( "select a from Animal as a" ).list();
+ assertEquals( "Incorrect result size", 2, results.size() );
+ assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testEntityPropertySelect() throws Exception {
+
+ createTestBaseData();
+
+ Session session = openSession();
+
+ List results = session.createQuery( "select a.mother from Animal as a" ).list();
+// assertEquals("Incorrect result size", 2, results.size());
+ assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testWhere() throws Exception {
+
+ createTestBaseData();
+
+ Session session = openSession();
+ List results = null;
+
+ results = session.createQuery( "from Animal an where an.bodyWeight > 10" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+
+ results = session.createQuery( "from Animal an where not an.bodyWeight > 10" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+
+ results = session.createQuery( "from Animal an where an.bodyWeight between 0 and 10" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+
+ results = session.createQuery( "from Animal an where an.bodyWeight not between 0 and 10" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+
+ results = session.createQuery( "from Animal an where sqrt(an.bodyWeight)/2 > 10" ).list();
+ assertEquals( "Incorrect result size", 0, results.size() );
+
+ results = session.createQuery( "from Animal an where (an.bodyWeight > 10 and an.bodyWeight < 100) or an.bodyWeight is null" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testEntityFetching() throws Exception {
+
+ createTestBaseData();
+
+ Session session = openSession();
+
+ List results = session.createQuery( "from Animal an join fetch an.mother" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+ assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
+ Animal mother = ( ( Animal ) results.get( 0 ) ).getMother();
+ assertTrue( "fetch uninitialized", mother != null && Hibernate.isInitialized( mother ) );
+
+ results = session.createQuery( "select an from Animal an join fetch an.mother" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+ assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
+ mother = ( ( Animal ) results.get( 0 ) ).getMother();
+ assertTrue( "fetch uninitialized", mother != null && Hibernate.isInitialized( mother ) );
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testCollectionFetching() throws Exception {
+
+ createTestBaseData();
+
+ Session session = openSession();
+ List results = session.createQuery( "from Animal an join fetch an.offspring" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+ assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
+ Collection os = ( ( Animal ) results.get( 0 ) ).getOffspring();
+ assertTrue( "fetch uninitialized", os != null && Hibernate.isInitialized( os ) && os.size() == 1 );
+
+ results = session.createQuery( "select an from Animal an join fetch an.offspring" ).list();
+ assertEquals( "Incorrect result size", 1, results.size() );
+ assertTrue( "Incorrect result return type", results.get( 0 ) instanceof Animal );
+ os = ( ( Animal ) results.get( 0 ) ).getOffspring();
+ assertTrue( "fetch uninitialized", os != null && Hibernate.isInitialized( os ) && os.size() == 1 );
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testProjectionQueries() throws Exception {
+
+ createTestBaseData();
+
+ Session session = openSession();
+
+ List results = session.createQuery( "select an.mother.id, max(an.bodyWeight) from Animal an group by an.mother.id" ).list();
+ // mysql returns nulls in this group by
+ assertEquals( "Incorrect result size", 2, results.size() );
+ assertTrue( "Incorrect return type", results.get( 0 ) instanceof Object[] );
+ assertEquals( "Incorrect return dimensions", 2, ( ( Object[] ) results.get( 0 ) ).length );
+
+ session.close();
+
+ destroyTestBaseData();
+
+ }
+
+ public void testStandardFunctions() throws Exception {
+ Session session = openSession();
+ Transaction t = session.beginTransaction();
+ Product p = new Product();
+ p.setDescription("a product");
+ p.setPrice( new BigDecimal(1.0) );
+ p.setProductId("abc123");
+ session.persist(p);
+ Object[] result = (Object[]) session
+ .createQuery("select current_time(), current_date(), current_timestamp() from Product")
+ .uniqueResult();
+ assertTrue( result[0] instanceof Time );
+ assertTrue( result[1] instanceof Date );
+ assertTrue( result[2] instanceof Timestamp );
+ assertNotNull( result[0] );
+ assertNotNull( result[1] );
+ assertNotNull( result[2] );
+ session.delete(p);
+ t.commit();
+ session.close();
+
+ }
+
+ public void testDynamicInstantiationQueries() throws Exception {
+
+ createTestBaseData();
+
+ Session session = openSession();
+
+ List results = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" ).list();
+ assertEquals( "Incorrect result size", 2, results.size() );
+ assertClassAssignability( results.get( 0 ).getClass(), Animal.class );
+
+ Iterator iter = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" ).iterate();
+ assertTrue( "Incorrect result size", iter.hasNext() );
+ assertTrue( "Incorrect return type", iter.next() instanceof Animal );
+
+ results = session.createQuery( "select new list(an.description, an.bodyWeight) from Animal an" ).list();
+ assertEquals( "Incorrect result size", 2, results.size() );
+ assertTrue( "Incorrect return type", results.get( 0 ) instanceof List );
+ assertEquals( "Incorrect return type", ( (List) results.get( 0 ) ).size(), 2 );
+
+ results = session.createQuery( "select new list(an.description, an.bodyWeight) from Animal an" ).list();
+ assertEquals( "Incorrect result size", 2, results.size() );
+ assertTrue( "Incorrect return type", results.get( 0 ) instanceof List );
+ assertEquals( "Incorrect return type", ( (List) results.get( 0 ) ).size(), 2 );
+
+ iter = session.createQuery( "select new list(an.description, an.bodyWeight) from Animal an" ).iterate();
+ assertTrue( "Incorrect result size", iter.hasNext() );
+ Object obj = iter.next();
+ assertTrue( "Incorrect return type", obj instanceof List );
+ assertEquals( "Incorrect return type", ( (List) obj ).size(), 2 );
+
+ iter = ((org.hibernate.classic.Session)session).iterate( "select new list(an.description, an.bodyWeight) from Animal an" );
+ assertTrue( "Incorrect result size", iter.hasNext() );
+ obj = iter.next();
+ assertTrue( "Incorrect return type", obj instanceof List );
+ assertEquals( "Incorrect return type", ( (List) obj ).size(), 2 );
+
+ results = session.createQuery( "select new map(an.description, an.bodyWeight) from Animal an" ).list();
+ assertEquals( "Incorrect result size", 2, results.size() );
+ assertTrue( "Incorrect return type", results.get( 0 ) instanceof Map );
+ assertEquals( "Incorrect return type", ( (Map) results.get( 0 ) ).size(), 2 );
+ assertTrue( ( (Map) results.get( 0 ) ).containsKey("0") );
+ assertTrue( ( (Map) results.get( 0 ) ).containsKey("1") );
+
+ results = session.createQuery( "select new map(an.description as descr, an.bodyWeight as bw) from Animal an" ).list();
+ assertEquals( "Incorrect result size", 2, results.size() );
+ assertTrue( "Incorrect return type", results.get( 0 ) instanceof Map );
+ assertEquals( "Incorrect return type", ( (Map) results.get( 0 ) ).size(), 2 );
+ assertTrue( ( (Map) results.get( 0 ) ).containsKey("descr") );
+ assertTrue( ( (Map) results.get( 0 ) ).containsKey("bw") );
+
+ iter = session.createQuery( "select new map(an.description, an.bodyWeight) from Animal an" ).iterate();
+ assertTrue( "Incorrect result size", iter.hasNext() );
+ obj = iter.next();
+ assertTrue( "Incorrect return type", obj instanceof Map );
+ assertEquals( "Incorrect return type", ( (Map) obj ).size(), 2 );
+
+ ScrollableResults sr = session.createQuery( "select new map(an.description, an.bodyWeight) from Animal an" ).scroll();
+ assertTrue( "Incorrect result size", sr.next() );
+ obj = sr.get(0);
+ assertTrue( "Incorrect return type", obj instanceof Map );
+ assertEquals( "Incorrect return type", ( (Map) obj ).size(), 2 );
+ sr.close();
+
+ sr = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" ).scroll();
+ assertTrue( "Incorrect result size", sr.next() );
+ assertTrue( "Incorrect return type", sr.get(0) instanceof Animal );
+ sr.close();
+
+ // caching...
+ QueryStatistics stats = getSessions().getStatistics().getQueryStatistics( "select new Animal(an.description, an.bodyWeight) from Animal an" );
+ results = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" )
+ .setCacheable( true )
+ .list();
+ assertEquals( "incorrect result size", 2, results.size() );
+ assertClassAssignability( Animal.class, results.get( 0 ).getClass() );
+ long initCacheHits = stats.getCacheHitCount();
+ results = session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" )
+ .setCacheable( true )
+ .list();
+ assertEquals( "dynamic intantiation query not served from cache", initCacheHits + 1, stats.getCacheHitCount() );
+ assertEquals( "incorrect result size", 2, results.size() );
+ assertClassAssignability( Animal.class, results.get( 0 ).getClass() );
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testIllegalMixedTransformerQueries() {
+ Session session = openSession();
+
+ try {
+ getSelectNewQuery( session ).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
+ fail("'select new' together with a resulttransformer should result in error!");
+ } catch(QueryException he) {
+ assertTrue(he.getMessage().indexOf("ResultTransformer")==0);
+ }
+
+ try {
+ getSelectNewQuery( session ).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).iterate();
+ fail("'select new' together with a resulttransformer should result in error!");
+ } catch(HibernateException he) {
+ assertTrue(he.getMessage().indexOf("ResultTransformer")==0);
+ }
+
+ try {
+ getSelectNewQuery( session ).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).scroll();
+ fail("'select new' together with a resulttransformer should result in error!");
+ } catch(HibernateException he) {
+ assertTrue(he.getMessage().indexOf("ResultTransformer")==0);
+ }
+
+ session.close();
+ }
+
+ private Query getSelectNewQuery(Session session) {
+ return session.createQuery( "select new Animal(an.description, an.bodyWeight) from Animal an" );
+ }
+ public void testResultTransformerScalarQueries() throws Exception {
+
+ createTestBaseData();
+
+ String query = "select an.description as description, an.bodyWeight as bodyWeight from Animal an order by bodyWeight desc";
+
+ Session session = openSession();
+
+ List results = session.createQuery( query )
+ .setResultTransformer(Transformers.aliasToBean(Animal.class)).list();
+ assertEquals( "Incorrect result size", results.size(), 2 );
+ assertTrue( "Incorrect return type", results.get(0) instanceof Animal );
+ Animal firstAnimal = (Animal) results.get(0);
+ Animal secondAnimal = (Animal) results.get(1);
+ assertEquals("Mammal #1", firstAnimal.getDescription());
+ assertEquals("Mammal #2", secondAnimal.getDescription());
+ assertFalse(session.contains(firstAnimal));
+ session.close();
+
+ session = openSession();
+
+ Iterator iter = session.createQuery( query )
+ .setResultTransformer(Transformers.aliasToBean(Animal.class)).iterate();
+ assertTrue( "Incorrect result size", iter.hasNext() );
+ assertTrue( "Incorrect return type", iter.next() instanceof Animal );
+
+ session.close();
+
+ session = openSession();
+
+ ScrollableResults sr = session.createQuery( query )
+ .setResultTransformer(Transformers.aliasToBean(Animal.class)).scroll();
+ assertTrue( "Incorrect result size", sr.next() );
+ assertTrue( "Incorrect return type", sr.get(0) instanceof Animal );
+ assertFalse(session.contains(sr.get(0)));
+ sr.close();
+
+ session.close();
+
+ session = openSession();
+
+ results = session.createQuery( "select a from Animal a, Animal b order by a.id" )
+ .setResultTransformer( DistinctRootEntityResultTransformer.INSTANCE )
+ .list();
+ assertEquals( "Incorrect result size", 2, results.size());
+ assertTrue( "Incorrect return type", results.get(0) instanceof Animal );
+ firstAnimal = (Animal) results.get(0);
+ secondAnimal = (Animal) results.get(1);
+ assertEquals("Mammal #1", firstAnimal.getDescription());
+ assertEquals("Mammal #2", secondAnimal.getDescription());
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testResultTransformerEntityQueries() throws Exception {
+
+ createTestBaseData();
+
+ String query = "select an as an from Animal an order by bodyWeight desc";
+
+ Session session = openSession();
+
+ List results = session.createQuery( query )
+ .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
+ assertEquals( "Incorrect result size", results.size(), 2 );
+ assertTrue( "Incorrect return type", results.get(0) instanceof Map );
+ Map map = ((Map) results.get(0));
+ assertEquals(1, map.size());
+ Animal firstAnimal = (Animal) map.get("an");
+ map = ((Map) results.get(1));
+ Animal secondAnimal = (Animal) map.get("an");
+ assertEquals("Mammal #1", firstAnimal.getDescription());
+ assertEquals("Mammal #2", secondAnimal.getDescription());
+ assertTrue(session.contains(firstAnimal));
+ assertSame(firstAnimal, session.get(Animal.class,firstAnimal.getId()));
+ session.close();
+
+ session = openSession();
+
+ Iterator iter = session.createQuery( query )
+ .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).iterate();
+ assertTrue( "Incorrect result size", iter.hasNext() );
+ map = (Map) iter.next();
+ firstAnimal = (Animal) map.get("an");
+ assertEquals("Mammal #1", firstAnimal.getDescription());
+ assertTrue( "Incorrect result size", iter.hasNext() );
+
+ session.close();
+
+ session = openSession();
+
+ ScrollableResults sr = session.createQuery( query )
+ .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).scroll();
+ assertTrue( "Incorrect result size", sr.next() );
+ assertTrue( "Incorrect return type", sr.get(0) instanceof Map );
+ assertFalse(session.contains(sr.get(0)));
+ sr.close();
+
+ session.close();
+
+ destroyTestBaseData();
+ }
+
+ public void testEJBQLFunctions() throws Exception {
+ Session session = openSession();
+
+ String hql = "from Animal a where a.description = concat('1', concat('2','3'), '4'||'5')||'0'";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where substring(a.description, 1, 3) = 'cat'";
+ session.createQuery(hql).list();
+
+ hql = "select substring(a.description, 1, 3) from Animal a";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where lower(a.description) = 'cat'";
+ session.createQuery(hql).list();
+
+ hql = "select lower(a.description) from Animal a";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where upper(a.description) = 'CAT'";
+ session.createQuery(hql).list();
+
+ hql = "select upper(a.description) from Animal a";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where length(a.description) = 5";
+ session.createQuery(hql).list();
+
+ hql = "select length(a.description) from Animal a";
+ session.createQuery(hql).list();
+
+ //note: postgres and db2 don't have a 3-arg form, it gets transformed to 2-args
+ hql = "from Animal a where locate('abc', a.description, 2) = 2";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where locate('abc', a.description) = 2";
+ session.createQuery(hql).list();
+
+ hql = "select locate('cat', a.description, 2) from Animal a";
+ session.createQuery(hql).list();
+
+ if ( !( getDialect() instanceof DB2Dialect ) ) {
+ hql = "from Animal a where trim(trailing '_' from a.description) = 'cat'";
+ session.createQuery(hql).list();
+
+ hql = "select trim(trailing '_' from a.description) from Animal a";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where trim(leading '_' from a.description) = 'cat'";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where trim(both from a.description) = 'cat'";
+ session.createQuery(hql).list();
+ }
+
+ if ( !(getDialect() instanceof HSQLDialect) ) { //HSQL doesn't like trim() without specification
+ hql = "from Animal a where trim(a.description) = 'cat'";
+ session.createQuery(hql).list();
+ }
+
+ hql = "from Animal a where abs(a.bodyWeight) = sqrt(a.bodyWeight)";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where mod(16, 4) = 4";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where bit_length(a.bodyWeight) = 24";
+ session.createQuery(hql).list();
+
+ hql = "select bit_length(a.bodyWeight) from Animal a";
+ session.createQuery(hql).list();
+
+ /*hql = "select object(a) from Animal a where CURRENT_DATE = :p1 or CURRENT_TIME = :p2 or CURRENT_TIMESTAMP = :p3";
+ session.createQuery(hql).list();*/
+
+ // todo the following is not supported
+ //hql = "select CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP from Animal a";
+ //parse(hql, true);
+ //System.out.println("sql: " + toSql(hql));
+
+ hql = "from Animal a where a.description like '%a%'";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where a.description not like '%a%'";
+ session.createQuery(hql).list();
+
+ hql = "from Animal a where a.description like 'x%ax%' escape 'x'";
+ session.createQuery(hql).list();
+
+ session.close();
+ }
+
+ public void testSubselectBetween() {
+ if ( supportsSubselectOnLeftSideIn() ) {
+ assertResultSize( "from Animal x where (select max(a.bodyWeight) from Animal a) in (1,2,3)", 0 );
+ assertResultSize( "from Animal x where (select max(a.bodyWeight) from Animal a) between 0 and 100", 0 );
+ assertResultSize( "from Animal x where (select max(a.description) from Animal a) like 'big%'", 0 );
+ assertResultSize( "from Animal x where (select max(a.bodyWeight) from Animal a) is not null", 0 );
+ }
+ assertResultSize( "from Animal x where exists (select max(a.bodyWeight) from Animal a)", 0 );
+ }
+
+ private void assertResultSize(String hql, int size) {
+ Session session = openSession();
+ Transaction txn = session.beginTransaction();
+ assertEquals( size, session.createQuery(hql).list().size() );
+ txn.commit();
+ session.close();
+ }
+
+ private interface QueryPreparer {
+ public void prepare(Query query);
+ }
+
+ private static final QueryPreparer DEFAULT_PREPARER = new QueryPreparer() {
+ public void prepare(Query query) {
+ }
+ };
+
+ private class SyntaxChecker {
+ private final String hql;
+ private final QueryPreparer preparer;
+
+ public SyntaxChecker(String hql) {
+ this( hql, DEFAULT_PREPARER );
+ }
+
+ public SyntaxChecker(String hql, QueryPreparer preparer) {
+ this.hql = hql;
+ this.preparer = preparer;
+ }
+
+ public void checkAll() {
+ checkList();
+ checkIterate();
+ checkScroll();
+ }
+
+ public SyntaxChecker checkList() {
+ Session s = openSession();
+ s.beginTransaction();
+ Query query = s.createQuery( hql );
+ preparer.prepare( query );
+ query.list();
+ s.getTransaction().commit();
+ s.close();
+ return this;
+ }
+
+ public SyntaxChecker checkScroll() {
+ Session s = openSession();
+ s.beginTransaction();
+ Query query = s.createQuery( hql );
+ preparer.prepare( query );
+ query.scroll();
+ s.getTransaction().commit();
+ s.close();
+ return this;
+ }
+
+ public SyntaxChecker checkIterate() {
+ Session s = openSession();
+ s.beginTransaction();
+ Query query = s.createQuery( hql );
+ preparer.prepare( query );
+ query.iterate();
+ s.getTransaction().commit();
+ s.close();
+ return this;
+ }
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,180 +0,0 @@
-package org.hibernate.test.idgen.enhanced;
-
-import java.util.Properties;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.hibernate.junit.UnitTestCase;
-import org.hibernate.dialect.Dialect;
-import org.hibernate.id.enhanced.SequenceStyleGenerator;
-import org.hibernate.id.enhanced.SequenceStructure;
-import org.hibernate.id.enhanced.OptimizerFactory;
-import org.hibernate.id.enhanced.TableStructure;
-import org.hibernate.Hibernate;
-import org.hibernate.MappingException;
-
-/**
- * Tests that SequenceStyleGenerator configures itself as expected
- * in various scenarios
- *
- * @author Steve Ebersole
- */
-public class SequenceStyleConfigUnitTest extends UnitTestCase {
- public SequenceStyleConfigUnitTest(String string) {
- super( string );
- }
-
- public static Test suite() {
- return new TestSuite( SequenceStyleConfigUnitTest.class );
- }
-
- /**
- * Test all params defaulted with a dialect supporting sequences
- */
- public void testDefaultedSequenceBackedConfiguration() {
- Dialect dialect = new SequenceDialect();
- Properties props = new Properties();
- SequenceStyleGenerator generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
-
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.NoopOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
- }
-
- /**
- * Test all params defaulted with a dialect which does not support sequences
- */
- public void testDefaultedTableBackedConfiguration() {
- Dialect dialect = new TableDialect();
- Properties props = new Properties();
- SequenceStyleGenerator generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
-
- assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.NoopOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
- }
-
- /**
- * Test default optimizer selection for sequence backed generators
- * based on the configured increment size; both in the case of the
- * dialect supporting pooled sequences (pooled) and not (hilo)
- */
- public void testDefaultOptimizerBasedOnIncrementBackedBySequence() {
- Properties props = new Properties();
- props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "10" );
-
- // for dialects which do not support pooled sequences, we default to hilo
- Dialect dialect = new SequenceDialect();
- SequenceStyleGenerator generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
-
- // for dialects which do support pooled sequences, we default to pooled
- dialect = new PooledSequenceDialect();
- generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
- }
-
- /**
- * Test default optimizer selection for table backed generators
- * based on the configured increment size. Here we always prefer
- * pooled.
- */
- public void testDefaultOptimizerBasedOnIncrementBackedByTable() {
- Properties props = new Properties();
- props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "10" );
- Dialect dialect = new TableDialect();
- SequenceStyleGenerator generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
- }
-
- /**
- * Test forcing of table as backing strucuture with dialect supporting sequences
- */
- public void testForceTableUse() {
- Dialect dialect = new SequenceDialect();
- Properties props = new Properties();
- props.setProperty( SequenceStyleGenerator.FORCE_TBL_PARAM, "true" );
- SequenceStyleGenerator generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.NoopOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
- }
-
- /**
- * Test explicitly specifying both optimizer and increment
- */
- public void testExplicitOptimizerWithExplicitIncrementSize() {
- // with sequence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Dialect dialect = new SequenceDialect();
-
- // optimizer=none w/ increment > 1 => should honor optimizer
- Properties props = new Properties();
- props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.NONE );
- props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
- SequenceStyleGenerator generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.NoopOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( 1, generator.getOptimizer().getIncrementSize() );
- assertEquals( 1, generator.getDatabaseStructure().getIncrementSize() );
-
- // optimizer=hilo w/ increment > 1 => hilo
- props = new Properties();
- props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.HILO );
- props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( 20, generator.getOptimizer().getIncrementSize() );
- assertEquals( 20, generator.getDatabaseStructure().getIncrementSize() );
-
- // optimizer=pooled w/ increment > 1 => hilo
- props = new Properties();
- props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.POOL );
- props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
- generator = new SequenceStyleGenerator();
- generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
- assertEquals( 20, generator.getOptimizer().getIncrementSize() );
- assertEquals( 20, generator.getDatabaseStructure().getIncrementSize() );
-
- }
-
- private static class TableDialect extends Dialect {
- public boolean supportsSequences() {
- return false;
- }
- }
-
- private static class SequenceDialect extends Dialect {
- public boolean supportsSequences() {
- return true;
- }
- public boolean supportsPooledSequences() {
- return false;
- }
- public String getSequenceNextValString(String sequenceName) throws MappingException {
- return "";
- }
- }
-
- private static class PooledSequenceDialect extends SequenceDialect {
- public boolean supportsPooledSequences() {
- return true;
- }
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java (from rev 15179, core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,183 @@
+package org.hibernate.test.idgen.enhanced;
+
+import java.util.Properties;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.hibernate.junit.UnitTestCase;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.id.enhanced.SequenceStyleGenerator;
+import org.hibernate.id.enhanced.SequenceStructure;
+import org.hibernate.id.enhanced.OptimizerFactory;
+import org.hibernate.id.enhanced.TableStructure;
+import org.hibernate.Hibernate;
+import org.hibernate.MappingException;
+
+/**
+ * Tests that SequenceStyleGenerator configures itself as expected
+ * in various scenarios
+ *
+ * @author Steve Ebersole
+ */
+public class SequenceStyleConfigUnitTest extends UnitTestCase {
+ public SequenceStyleConfigUnitTest(String string) {
+ super( string );
+ }
+
+ public static Test suite() {
+ return new TestSuite( SequenceStyleConfigUnitTest.class );
+ }
+
+ /**
+ * Test all params defaulted with a dialect supporting sequences
+ */
+ public void testDefaultedSequenceBackedConfiguration() {
+ Dialect dialect = new SequenceDialect();
+ Properties props = new Properties();
+ SequenceStyleGenerator generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+
+ assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.NoopOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
+ }
+
+ /**
+ * Test all params defaulted with a dialect which does not support sequences
+ */
+ public void testDefaultedTableBackedConfiguration() {
+ Dialect dialect = new TableDialect();
+ Properties props = new Properties();
+ SequenceStyleGenerator generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.NoopOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
+ }
+
+ /**
+ * Test default optimizer selection for sequence backed generators
+ * based on the configured increment size; both in the case of the
+ * dialect supporting pooled sequences (pooled) and not (hilo)
+ */
+ public void testDefaultOptimizerBasedOnIncrementBackedBySequence() {
+ Properties props = new Properties();
+ props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "10" );
+
+ // for dialects which do not support pooled sequences, we default to pooled+table
+ Dialect dialect = new SequenceDialect();
+ SequenceStyleGenerator generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
+
+ // for dialects which do support pooled sequences, we default to pooled+sequence
+ dialect = new PooledSequenceDialect();
+ generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+ assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
+ }
+
+ /**
+ * Test default optimizer selection for table backed generators
+ * based on the configured increment size. Here we always prefer
+ * pooled.
+ */
+ public void testDefaultOptimizerBasedOnIncrementBackedByTable() {
+ Properties props = new Properties();
+ props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "10" );
+ Dialect dialect = new TableDialect();
+ SequenceStyleGenerator generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
+ }
+
+ /**
+ * Test forcing of table as backing strucuture with dialect supporting sequences
+ */
+ public void testForceTableUse() {
+ Dialect dialect = new SequenceDialect();
+ Properties props = new Properties();
+ props.setProperty( SequenceStyleGenerator.FORCE_TBL_PARAM, "true" );
+ SequenceStyleGenerator generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.NoopOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
+ }
+
+ /**
+ * Test explicitly specifying both optimizer and increment
+ */
+ public void testExplicitOptimizerWithExplicitIncrementSize() {
+ // with sequence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ final Dialect dialect = new SequenceDialect();
+
+ // optimizer=none w/ increment > 1 => should honor optimizer
+ Properties props = new Properties();
+ props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.NONE );
+ props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
+ SequenceStyleGenerator generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+ assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.NoopOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( 1, generator.getOptimizer().getIncrementSize() );
+ assertEquals( 1, generator.getDatabaseStructure().getIncrementSize() );
+
+ // optimizer=hilo w/ increment > 1 => hilo
+ props = new Properties();
+ props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.HILO );
+ props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
+ generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+ assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( 20, generator.getOptimizer().getIncrementSize() );
+ assertEquals( 20, generator.getDatabaseStructure().getIncrementSize() );
+
+ // optimizer=pooled w/ increment > 1 => hilo
+ props = new Properties();
+ props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.POOL );
+ props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
+ generator = new SequenceStyleGenerator();
+ generator.configure( Hibernate.LONG, props, dialect );
+ // because the dialect reports to not support pooled seqyences, the expectation is that we will
+ // use a table for the backing structure...
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
+ assertEquals( 20, generator.getOptimizer().getIncrementSize() );
+ assertEquals( 20, generator.getDatabaseStructure().getIncrementSize() );
+
+ }
+
+ private static class TableDialect extends Dialect {
+ public boolean supportsSequences() {
+ return false;
+ }
+ }
+
+ private static class SequenceDialect extends Dialect {
+ public boolean supportsSequences() {
+ return true;
+ }
+ public boolean supportsPooledSequences() {
+ return false;
+ }
+ public String getSequenceNextValString(String sequenceName) throws MappingException {
+ return "";
+ }
+ }
+
+ private static class PooledSequenceDialect extends SequenceDialect {
+ public boolean supportsPooledSequences() {
+ return true;
+ }
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,620 +0,0 @@
-package org.hibernate.test.sql.hand.query;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.hibernate.Hibernate;
-import org.hibernate.HibernateException;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.hibernate.test.sql.hand.Organization;
-import org.hibernate.test.sql.hand.Person;
-import org.hibernate.test.sql.hand.Employment;
-import org.hibernate.test.sql.hand.Product;
-import org.hibernate.test.sql.hand.Order;
-import org.hibernate.test.sql.hand.Dimension;
-import org.hibernate.test.sql.hand.SpaceShip;
-import org.hibernate.test.sql.hand.Speech;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.cfg.Environment;
-import org.hibernate.junit.functional.FunctionalTestCase;
-import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
-import org.hibernate.transform.DistinctRootEntityResultTransformer;
-import org.hibernate.transform.Transformers;
-import org.hibernate.transform.AliasToEntityMapResultTransformer;
-
-/**
- * Tests of various features of native SQL queries.
- *
- * @author Steve Ebersole
- */
-public class NativeSQLQueriesTest extends FunctionalTestCase {
-
- public NativeSQLQueriesTest(String x) {
- super( x );
- }
-
- public String[] getMappings() {
- return new String[] { "sql/hand/query/NativeSQLQueries.hbm.xml" };
- }
-
- public void configure(Configuration cfg) {
- super.configure( cfg );
- cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
- }
-
- public static Test suite() {
- return new FunctionalTestClassTestSuite( NativeSQLQueriesTest.class );
- }
-
- protected String getOrganizationFetchJoinEmploymentSQL() {
- return "SELECT org.ORGID as {org.id}, " +
- " org.NAME as {org.name}, " +
- " emp.EMPLOYER as {emp.key}, " +
- " emp.EMPID as {emp.element}, " +
- " {emp.element.*} " +
- "FROM ORGANIZATION org " +
- " LEFT OUTER JOIN EMPLOYMENT emp ON org.ORGID = emp.EMPLOYER";
- }
-
- protected String getOrganizationJoinEmploymentSQL() {
- return "SELECT org.ORGID as {org.id}, " +
- " org.NAME as {org.name}, " +
- " {emp.*} " +
- "FROM ORGANIZATION org " +
- " LEFT OUTER JOIN EMPLOYMENT emp ON org.ORGID = emp.EMPLOYER";
- }
-
- protected String getEmploymentSQL() {
- return "SELECT * FROM EMPLOYMENT";
- }
-
- protected String getEmploymentSQLMixedScalarEntity() {
- return "SELECT e.*, e.employer as employerid FROM EMPLOYMENT e" ;
- }
-
- protected String getOrgEmpRegionSQL() {
- return "select {org.*}, {emp.*}, emp.REGIONCODE " +
- "from ORGANIZATION org " +
- " left outer join EMPLOYMENT emp on org.ORGID = emp.EMPLOYER";
- }
-
- protected String getOrgEmpPersonSQL() {
- return "select {org.*}, {emp.*}, {pers.*} " +
- "from ORGANIZATION org " +
- " join EMPLOYMENT emp on org.ORGID = emp.EMPLOYER " +
- " join PERSON pers on pers.PERID = emp.EMPLOYEE ";
- }
-
- public void testFailOnNoAddEntityOrScalar() {
- // Note: this passes, but for the wrong reason.
- // there is actually an exception thrown, but it is the database
- // throwing a sql exception because the SQL gets passed
- // "un-processed"...
- Session s = openSession();
- s.beginTransaction();
- try {
- String sql = "select {org.*} " +
- "from organization org";
- s.createSQLQuery( sql ).list();
- fail( "Should throw an exception since no addEntity nor addScalar has been performed." );
- }
- catch( HibernateException he) {
- // expected behavior
- }
- finally {
- s.getTransaction().rollback();
- s.close();
- }
- }
-
- public void testManualSynchronization() {
- Session s = openSession();
- s.beginTransaction();
-
- sfi().getStatistics().clear();
-
- // create an Organization...
- Organization jboss = new Organization( "JBoss" );
- s.persist( jboss );
-
- // now query on Employment, this should not cause an auto-flush
- s.createSQLQuery( getEmploymentSQL() ).list();
- assertEquals( 0, sfi().getStatistics().getEntityInsertCount() );
-
- // now try to query on Employment but this time add Organization as a synchronized query space...
- s.createSQLQuery( getEmploymentSQL() ).addSynchronizedEntityClass( Organization.class ).list();
- assertEquals( 1, sfi().getStatistics().getEntityInsertCount() );
-
- // clean up
- s.delete( jboss );
- s.getTransaction().commit();
- s.close();
- }
-
- public void testSQLQueryInterface() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Organization ifa = new Organization("IFA");
- Organization jboss = new Organization("JBoss");
- Person gavin = new Person("Gavin");
- Employment emp = new Employment(gavin, jboss, "AU");
-
- s.persist(ifa);
- s.persist(jboss);
- s.persist(gavin);
- s.persist(emp);
-
- List l = s.createSQLQuery( getOrgEmpRegionSQL() )
- .addEntity("org", Organization.class)
- .addJoin("emp", "org.employments")
- .addScalar("regionCode", Hibernate.STRING)
- .list();
- assertEquals( 2, l.size() );
-
- l = s.createSQLQuery( getOrgEmpPersonSQL() )
- .addEntity("org", Organization.class)
- .addJoin("emp", "org.employments")
- .addJoin("pers", "emp.employee")
- .list();
- assertEquals( l.size(), 1 );
-
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
-
- l = s.createSQLQuery( "select {org.*}, {emp.*} " +
- "from ORGANIZATION org " +
- " left outer join EMPLOYMENT emp on org.ORGID = emp.EMPLOYER, ORGANIZATION org2" )
- .addEntity("org", Organization.class)
- .addJoin("emp", "org.employments")
- .setResultTransformer(new DistinctRootEntityResultTransformer())
- .list();
- assertEquals( l.size(), 2 );
-
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
-
- s.delete(emp);
- s.delete(gavin);
- s.delete(ifa);
- s.delete(jboss);
-
- t.commit();
- s.close();
- }
-
- public void testResultSetMappingDefinition() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Organization ifa = new Organization("IFA");
- Organization jboss = new Organization("JBoss");
- Person gavin = new Person("Gavin");
- Employment emp = new Employment(gavin, jboss, "AU");
-
- s.persist(ifa);
- s.persist(jboss);
- s.persist(gavin);
- s.persist(emp);
-
- List l = s.createSQLQuery( getOrgEmpRegionSQL() )
- .setResultSetMapping( "org-emp-regionCode" )
- .list();
- assertEquals( l.size(), 2 );
-
- l = s.createSQLQuery( getOrgEmpPersonSQL() )
- .setResultSetMapping( "org-emp-person" )
- .list();
- assertEquals( l.size(), 1 );
-
- s.delete(emp);
- s.delete(gavin);
- s.delete(ifa);
- s.delete(jboss);
-
- t.commit();
- s.close();
- }
-
- public void testScalarValues() throws Exception {
- Session s = openSession();
- Transaction t = s.beginTransaction();
-
- Organization ifa = new Organization( "IFA" );
- Organization jboss = new Organization( "JBoss" );
-
- Serializable idIfa = s.save( ifa );
- Serializable idJBoss = s.save( jboss );
-
- s.flush();
-
- List result = s.getNamedQuery( "orgNamesOnly" ).list();
- assertTrue( result.contains( "IFA" ) );
- assertTrue( result.contains( "JBoss" ) );
-
- result = s.getNamedQuery( "orgNamesOnly" ).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
- Map m = (Map) result.get(0);
- assertEquals( 2, result.size() );
- assertEquals( 1, m.size() );
- assertTrue( m.containsKey("NAME") );
-
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
-
- Iterator iter = s.getNamedQuery( "orgNamesAndOrgs" ).list().iterator();
- Object[] o = ( Object[] ) iter.next();
- assertEquals( o[0], "IFA" );
- assertEquals( ( ( Organization ) o[1] ).getName(), "IFA" );
- o = ( Object[] ) iter.next();
- assertEquals( o[0], "JBoss" );
- assertEquals( ( ( Organization ) o[1] ).getName(), "JBoss" );
-
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
-
- // test that the ordering of the results is truly based on the order in which they were defined
- iter = s.getNamedQuery( "orgsAndOrgNames" ).list().iterator();
- Object[] row = ( Object[] ) iter.next();
- assertEquals( "expecting non-scalar result first", Organization.class, row[0].getClass() );
- assertEquals( "expecting scalar result second", String.class, row[1].getClass() );
- assertEquals( ( ( Organization ) row[0] ).getName(), "IFA" );
- assertEquals( row[1], "IFA" );
- row = ( Object[] ) iter.next();
- assertEquals( "expecting non-scalar result first", Organization.class, row[0].getClass() );
- assertEquals( "expecting scalar result second", String.class, row[1].getClass() );
- assertEquals( ( ( Organization ) row[0] ).getName(), "JBoss" );
- assertEquals( row[1], "JBoss" );
- assertFalse( iter.hasNext() );
-
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
-
- iter = s.getNamedQuery( "orgIdsAndOrgNames" ).list().iterator();
- o = ( Object[] ) iter.next();
- assertEquals( o[1], "IFA" );
- assertEquals( o[0], idIfa );
- o = ( Object[] ) iter.next();
- assertEquals( o[1], "JBoss" );
- assertEquals( o[0], idJBoss );
-
- s.delete( ifa );
- s.delete( jboss );
- t.commit();
- s.close();
- }
-
- public void testMappedAliasStrategy() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Organization ifa = new Organization("IFA");
- Organization jboss = new Organization("JBoss");
- Person gavin = new Person("Gavin");
- Employment emp = new Employment(gavin, jboss, "AU");
- Serializable orgId = s.save(jboss);
- Serializable orgId2 = s.save(ifa);
- s.save(gavin);
- s.save(emp);
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- Query namedQuery = s.getNamedQuery("AllEmploymentAsMapped");
- List list = namedQuery.list();
- assertEquals(1,list.size());
- Employment emp2 = (Employment) list.get(0);
- assertEquals(emp2.getEmploymentId(), emp.getEmploymentId() );
- assertEquals(emp2.getStartDate().getDate(), emp.getStartDate().getDate() );
- assertEquals(emp2.getEndDate(), emp.getEndDate() );
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- Query sqlQuery = s.getNamedQuery("EmploymentAndPerson");
- sqlQuery.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
- list = sqlQuery.list();
- assertEquals(1,list.size() );
- Object res = list.get(0);
- assertClassAssignability(res.getClass(),Map.class);
- Map m = (Map) res;
- assertEquals(2,m.size());
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- sqlQuery = s.getNamedQuery("organizationreturnproperty");
- sqlQuery.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
- list = sqlQuery.list();
- assertEquals(2,list.size() );
- m = (Map) list.get(0);
- assertTrue(m.containsKey("org"));
- assertClassAssignability(m.get("org").getClass(), Organization.class);
- assertTrue(m.containsKey("emp"));
- assertClassAssignability(m.get("emp").getClass(), Employment.class);
- assertEquals(2, m.size());
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- namedQuery = s.getNamedQuery("EmploymentAndPerson");
- list = namedQuery.list();
- assertEquals(1,list.size() );
- Object[] objs = (Object[]) list.get(0);
- assertEquals(2, objs.length);
- emp2 = (Employment) objs[0];
- gavin = (Person) objs[1];
- s.delete(emp2);
- s.delete(jboss);
- s.delete(gavin);
- s.delete(ifa);
- t.commit();
- s.close();
- }
-
- /* test for native sql composite id joins which has never been implemented */
- public void testCompositeIdJoinsFailureExpected() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Person person = new Person();
- person.setName( "Noob" );
-
- Product product = new Product();
- product.setProductId( new Product.ProductId() );
- product.getProductId().setOrgid( "x" );
- product.getProductId().setProductnumber( "1234" );
- product.setName( "Hibernate 3" );
-
- Order order = new Order();
- order.setOrderId( new Order.OrderId() );
- order.getOrderId().setOrdernumber( "1" );
- order.getOrderId().setOrgid( "y" );
-
- product.getOrders().add( order );
- order.setProduct( product );
- order.setPerson( person );
-
- s.save( product );
- s.save( order);
- s.save( person );
-
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- Product p = (Product) s.createQuery( "from Product p join fetch p.orders" ).list().get(0);
- assertTrue(Hibernate.isInitialized( p.getOrders()));
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- Object[] o = (Object[]) s.createSQLQuery( "select\r\n" +
- " product.orgid as {product.id.orgid}," +
- " product.productnumber as {product.id.productnumber}," +
- " {prod_orders}.orgid as orgid3_1_,\r\n" +
- " {prod_orders}.ordernumber as ordernum2_3_1_,\r\n" +
- " product.name as {product.name}," +
- " {prod_orders.element.*}" +
- /*" orders.PROD_NO as PROD4_3_1_,\r\n" +
- " orders.person as person3_1_,\r\n" +
- " orders.PROD_ORGID as PROD3_0__,\r\n" +
- " orders.PROD_NO as PROD4_0__,\r\n" +
- " orders.orgid as orgid0__,\r\n" +
- " orders.ordernumber as ordernum2_0__ \r\n" +*/
- " from\r\n" +
- " Product product \r\n" +
- " inner join\r\n" +
- " TBL_ORDER {prod_orders} \r\n" +
- " on product.orgid={prod_orders}.PROD_ORGID \r\n" +
- " and product.productnumber={prod_orders}.PROD_NO" )
- .addEntity( "product", Product.class )
- .addJoin( "prod_orders", "product.orders" )
- .list().get(0);
-
- p = (Product) o[0];
- assertTrue(Hibernate.isInitialized( p.getOrders() ));
- assertNotNull(p.getOrders().iterator().next());
- t.commit();
- s.close();
- }
-
- public void testAutoDetectAliasing() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Organization ifa = new Organization("IFA");
- Organization jboss = new Organization("JBoss");
- Person gavin = new Person("Gavin");
- Employment emp = new Employment(gavin, jboss, "AU");
- Serializable orgId = s.save(jboss);
- Serializable orgId2 = s.save(ifa);
- s.save(gavin);
- s.save(emp);
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- List list = s.createSQLQuery( getEmploymentSQL() )
- .addEntity( Employment.class.getName() )
- .list();
- assertEquals( 1,list.size() );
-
- Employment emp2 = (Employment) list.get(0);
- assertEquals(emp2.getEmploymentId(), emp.getEmploymentId() );
- assertEquals(emp2.getStartDate().getDate(), emp.getStartDate().getDate() );
- assertEquals(emp2.getEndDate(), emp.getEndDate() );
-
- s.clear();
-
- list = s.createSQLQuery( getEmploymentSQL() )
- .addEntity( Employment.class.getName() )
- .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP)
- .list();
- assertEquals( 1,list.size() );
- Map m = (Map) list.get(0);
- assertTrue(m.containsKey("Employment"));
- assertEquals(1,m.size());
-
- list = s.createSQLQuery(getEmploymentSQL()).list();
- assertEquals(1, list.size());
- Object[] o = (Object[]) list.get(0);
- assertEquals(8, o.length);
-
- list = s.createSQLQuery( getEmploymentSQL() ).setResultTransformer( new UpperCasedAliasToEntityMapResultTransformer() ).list();
- assertEquals(1, list.size());
- m = (Map) list.get(0);
- assertTrue(m.containsKey("EMPID"));
- assertTrue(m.containsKey("VALUE"));
- assertTrue(m.containsKey("ENDDATE"));
- assertEquals(8, m.size());
-
- list = s.createSQLQuery( getEmploymentSQLMixedScalarEntity() ).addScalar( "employerid" ).addEntity( Employment.class ).list();
- assertEquals(1, list.size());
- o = (Object[]) list.get(0);
- assertEquals(2, o.length);
- assertClassAssignability( o[0].getClass(), Number.class);
- assertClassAssignability( o[1].getClass(), Employment.class);
-
-
-
- Query queryWithCollection = s.getNamedQuery("organizationEmploymentsExplicitAliases");
- queryWithCollection.setLong("id", jboss.getId() );
- list = queryWithCollection.list();
- assertEquals(list.size(),1);
-
- s.clear();
-
- list = s.createSQLQuery( getOrganizationJoinEmploymentSQL() )
- .addEntity( "org", Organization.class )
- .addJoin( "emp", "org.employments" )
- .list();
- assertEquals( 2,list.size() );
-
- s.clear();
-
- list = s.createSQLQuery( getOrganizationFetchJoinEmploymentSQL() )
- .addEntity( "org", Organization.class )
- .addJoin( "emp", "org.employments" )
- .list();
- assertEquals( 2,list.size() );
-
- s.clear();
-
- // TODO : why twice?
- s.getNamedQuery( "organizationreturnproperty" ).list();
- list = s.getNamedQuery( "organizationreturnproperty" ).list();
- assertEquals( 2,list.size() );
-
- s.clear();
-
- list = s.getNamedQuery( "organizationautodetect" ).list();
- assertEquals( 2,list.size() );
-
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- s.delete(emp2);
-
- s.delete(jboss);
- s.delete(gavin);
- s.delete(ifa);
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- Dimension dim = new Dimension( 3, Integer.MAX_VALUE );
- s.save( dim );
- list = s.createSQLQuery( "select d_len * d_width as surface, d_len * d_width * 10 as volume from Dimension" ).list();
- s.delete( dim );
- t.commit();
- s.close();
-
- s = openSession();
- t = s.beginTransaction();
- SpaceShip enterprise = new SpaceShip();
- enterprise.setModel( "USS" );
- enterprise.setName( "Entreprise" );
- enterprise.setSpeed( 50d );
- Dimension d = new Dimension(45, 10);
- enterprise.setDimensions( d );
- s.save( enterprise );
- Object[] result = (Object[]) s.getNamedQuery( "spaceship" ).uniqueResult();
- enterprise = ( SpaceShip ) result[0];
- assertTrue(50d == enterprise.getSpeed() );
- assertTrue( 450d == extractDoubleValue( result[1] ) );
- assertTrue( 4500d == extractDoubleValue( result[2] ) );
- s.delete( enterprise );
- t.commit();
- s.close();
-
- }
-
- public void testMixAndMatchEntityScalar() {
- Session s = openSession();
- Transaction t = s.beginTransaction();
- Speech speech = new Speech();
- speech.setLength( new Double( 23d ) );
- speech.setName( "Mine" );
- s.persist( speech );
- s.flush();
- s.clear();
-
- List l = s.createSQLQuery( "select name, id, flength, name as scalarName from Speech" )
- .setResultSetMapping( "speech" )
- .list();
- assertEquals( l.size(), 1 );
-
- t.rollback();
- s.close();
- }
-
- private double extractDoubleValue(Object value) {
- if ( value instanceof BigInteger ) {
- return ( ( BigInteger ) value ).doubleValue();
- }
- else if ( value instanceof BigDecimal ) {
- return ( ( BigDecimal ) value ).doubleValue();
- }
- else {
- return Double.valueOf( value.toString() ).doubleValue();
- }
- }
-
- private static class UpperCasedAliasToEntityMapResultTransformer extends AliasToEntityMapResultTransformer {
- public Object transformTuple(Object[] tuple, String[] aliases) {
- String[] ucAliases = new String[aliases.length];
- for ( int i = 0; i < aliases.length; i++ ) {
- ucAliases[i] = aliases[i].toUpperCase();
- }
- return super.transformTuple( tuple, ucAliases );
- }
- }
-}
Copied: core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java (from rev 15175, core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java)
===================================================================
--- core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java (rev 0)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/java/org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,624 @@
+package org.hibernate.test.sql.hand.query;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import junit.framework.Test;
+
+import org.hibernate.Hibernate;
+import org.hibernate.HibernateException;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.hibernate.test.sql.hand.Organization;
+import org.hibernate.test.sql.hand.Person;
+import org.hibernate.test.sql.hand.Employment;
+import org.hibernate.test.sql.hand.Product;
+import org.hibernate.test.sql.hand.Order;
+import org.hibernate.test.sql.hand.Dimension;
+import org.hibernate.test.sql.hand.SpaceShip;
+import org.hibernate.test.sql.hand.Speech;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
+import org.hibernate.transform.DistinctRootEntityResultTransformer;
+import org.hibernate.transform.Transformers;
+import org.hibernate.transform.BasicTransformerAdapter;
+
+/**
+ * Tests of various features of native SQL queries.
+ *
+ * @author Steve Ebersole
+ */
+public class NativeSQLQueriesTest extends FunctionalTestCase {
+
+ public NativeSQLQueriesTest(String x) {
+ super( x );
+ }
+
+ public String[] getMappings() {
+ return new String[] { "sql/hand/query/NativeSQLQueries.hbm.xml" };
+ }
+
+ public void configure(Configuration cfg) {
+ super.configure( cfg );
+ cfg.setProperty( Environment.GENERATE_STATISTICS, "true" );
+ }
+
+ public static Test suite() {
+ return new FunctionalTestClassTestSuite( NativeSQLQueriesTest.class );
+ }
+
+ protected String getOrganizationFetchJoinEmploymentSQL() {
+ return "SELECT org.ORGID as {org.id}, " +
+ " org.NAME as {org.name}, " +
+ " emp.EMPLOYER as {emp.key}, " +
+ " emp.EMPID as {emp.element}, " +
+ " {emp.element.*} " +
+ "FROM ORGANIZATION org " +
+ " LEFT OUTER JOIN EMPLOYMENT emp ON org.ORGID = emp.EMPLOYER";
+ }
+
+ protected String getOrganizationJoinEmploymentSQL() {
+ return "SELECT org.ORGID as {org.id}, " +
+ " org.NAME as {org.name}, " +
+ " {emp.*} " +
+ "FROM ORGANIZATION org " +
+ " LEFT OUTER JOIN EMPLOYMENT emp ON org.ORGID = emp.EMPLOYER";
+ }
+
+ protected String getEmploymentSQL() {
+ return "SELECT * FROM EMPLOYMENT";
+ }
+
+ protected String getEmploymentSQLMixedScalarEntity() {
+ return "SELECT e.*, e.employer as employerid FROM EMPLOYMENT e" ;
+ }
+
+ protected String getOrgEmpRegionSQL() {
+ return "select {org.*}, {emp.*}, emp.REGIONCODE " +
+ "from ORGANIZATION org " +
+ " left outer join EMPLOYMENT emp on org.ORGID = emp.EMPLOYER";
+ }
+
+ protected String getOrgEmpPersonSQL() {
+ return "select {org.*}, {emp.*}, {pers.*} " +
+ "from ORGANIZATION org " +
+ " join EMPLOYMENT emp on org.ORGID = emp.EMPLOYER " +
+ " join PERSON pers on pers.PERID = emp.EMPLOYEE ";
+ }
+
+ public void testFailOnNoAddEntityOrScalar() {
+ // Note: this passes, but for the wrong reason.
+ // there is actually an exception thrown, but it is the database
+ // throwing a sql exception because the SQL gets passed
+ // "un-processed"...
+ Session s = openSession();
+ s.beginTransaction();
+ try {
+ String sql = "select {org.*} " +
+ "from organization org";
+ s.createSQLQuery( sql ).list();
+ fail( "Should throw an exception since no addEntity nor addScalar has been performed." );
+ }
+ catch( HibernateException he) {
+ // expected behavior
+ }
+ finally {
+ s.getTransaction().rollback();
+ s.close();
+ }
+ }
+
+ public void testManualSynchronization() {
+ Session s = openSession();
+ s.beginTransaction();
+
+ sfi().getStatistics().clear();
+
+ // create an Organization...
+ Organization jboss = new Organization( "JBoss" );
+ s.persist( jboss );
+
+ // now query on Employment, this should not cause an auto-flush
+ s.createSQLQuery( getEmploymentSQL() ).list();
+ assertEquals( 0, sfi().getStatistics().getEntityInsertCount() );
+
+ // now try to query on Employment but this time add Organization as a synchronized query space...
+ s.createSQLQuery( getEmploymentSQL() ).addSynchronizedEntityClass( Organization.class ).list();
+ assertEquals( 1, sfi().getStatistics().getEntityInsertCount() );
+
+ // clean up
+ s.delete( jboss );
+ s.getTransaction().commit();
+ s.close();
+ }
+
+ public void testSQLQueryInterface() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Organization ifa = new Organization("IFA");
+ Organization jboss = new Organization("JBoss");
+ Person gavin = new Person("Gavin");
+ Employment emp = new Employment(gavin, jboss, "AU");
+
+ s.persist(ifa);
+ s.persist(jboss);
+ s.persist(gavin);
+ s.persist(emp);
+
+ List l = s.createSQLQuery( getOrgEmpRegionSQL() )
+ .addEntity("org", Organization.class)
+ .addJoin("emp", "org.employments")
+ .addScalar("regionCode", Hibernate.STRING)
+ .list();
+ assertEquals( 2, l.size() );
+
+ l = s.createSQLQuery( getOrgEmpPersonSQL() )
+ .addEntity("org", Organization.class)
+ .addJoin("emp", "org.employments")
+ .addJoin("pers", "emp.employee")
+ .list();
+ assertEquals( l.size(), 1 );
+
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+
+ l = s.createSQLQuery( "select {org.*}, {emp.*} " +
+ "from ORGANIZATION org " +
+ " left outer join EMPLOYMENT emp on org.ORGID = emp.EMPLOYER, ORGANIZATION org2" )
+ .addEntity("org", Organization.class)
+ .addJoin("emp", "org.employments")
+ .setResultTransformer( DistinctRootEntityResultTransformer.INSTANCE )
+ .list();
+ assertEquals( l.size(), 2 );
+
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+
+ s.delete(emp);
+ s.delete(gavin);
+ s.delete(ifa);
+ s.delete(jboss);
+
+ t.commit();
+ s.close();
+ }
+
+ public void testResultSetMappingDefinition() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Organization ifa = new Organization("IFA");
+ Organization jboss = new Organization("JBoss");
+ Person gavin = new Person("Gavin");
+ Employment emp = new Employment(gavin, jboss, "AU");
+
+ s.persist(ifa);
+ s.persist(jboss);
+ s.persist(gavin);
+ s.persist(emp);
+
+ List l = s.createSQLQuery( getOrgEmpRegionSQL() )
+ .setResultSetMapping( "org-emp-regionCode" )
+ .list();
+ assertEquals( l.size(), 2 );
+
+ l = s.createSQLQuery( getOrgEmpPersonSQL() )
+ .setResultSetMapping( "org-emp-person" )
+ .list();
+ assertEquals( l.size(), 1 );
+
+ s.delete(emp);
+ s.delete(gavin);
+ s.delete(ifa);
+ s.delete(jboss);
+
+ t.commit();
+ s.close();
+ }
+
+ public void testScalarValues() throws Exception {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+
+ Organization ifa = new Organization( "IFA" );
+ Organization jboss = new Organization( "JBoss" );
+
+ Serializable idIfa = s.save( ifa );
+ Serializable idJBoss = s.save( jboss );
+
+ s.flush();
+
+ List result = s.getNamedQuery( "orgNamesOnly" ).list();
+ assertTrue( result.contains( "IFA" ) );
+ assertTrue( result.contains( "JBoss" ) );
+
+ result = s.getNamedQuery( "orgNamesOnly" ).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).list();
+ Map m = (Map) result.get(0);
+ assertEquals( 2, result.size() );
+ assertEquals( 1, m.size() );
+ assertTrue( m.containsKey("NAME") );
+
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+
+ Iterator iter = s.getNamedQuery( "orgNamesAndOrgs" ).list().iterator();
+ Object[] o = ( Object[] ) iter.next();
+ assertEquals( o[0], "IFA" );
+ assertEquals( ( ( Organization ) o[1] ).getName(), "IFA" );
+ o = ( Object[] ) iter.next();
+ assertEquals( o[0], "JBoss" );
+ assertEquals( ( ( Organization ) o[1] ).getName(), "JBoss" );
+
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+
+ // test that the ordering of the results is truly based on the order in which they were defined
+ iter = s.getNamedQuery( "orgsAndOrgNames" ).list().iterator();
+ Object[] row = ( Object[] ) iter.next();
+ assertEquals( "expecting non-scalar result first", Organization.class, row[0].getClass() );
+ assertEquals( "expecting scalar result second", String.class, row[1].getClass() );
+ assertEquals( ( ( Organization ) row[0] ).getName(), "IFA" );
+ assertEquals( row[1], "IFA" );
+ row = ( Object[] ) iter.next();
+ assertEquals( "expecting non-scalar result first", Organization.class, row[0].getClass() );
+ assertEquals( "expecting scalar result second", String.class, row[1].getClass() );
+ assertEquals( ( ( Organization ) row[0] ).getName(), "JBoss" );
+ assertEquals( row[1], "JBoss" );
+ assertFalse( iter.hasNext() );
+
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+
+ iter = s.getNamedQuery( "orgIdsAndOrgNames" ).list().iterator();
+ o = ( Object[] ) iter.next();
+ assertEquals( o[1], "IFA" );
+ assertEquals( o[0], idIfa );
+ o = ( Object[] ) iter.next();
+ assertEquals( o[1], "JBoss" );
+ assertEquals( o[0], idJBoss );
+
+ s.delete( ifa );
+ s.delete( jboss );
+ t.commit();
+ s.close();
+ }
+
+ public void testMappedAliasStrategy() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Organization ifa = new Organization("IFA");
+ Organization jboss = new Organization("JBoss");
+ Person gavin = new Person("Gavin");
+ Employment emp = new Employment(gavin, jboss, "AU");
+ Serializable orgId = s.save(jboss);
+ Serializable orgId2 = s.save(ifa);
+ s.save(gavin);
+ s.save(emp);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ Query namedQuery = s.getNamedQuery("AllEmploymentAsMapped");
+ List list = namedQuery.list();
+ assertEquals(1,list.size());
+ Employment emp2 = (Employment) list.get(0);
+ assertEquals(emp2.getEmploymentId(), emp.getEmploymentId() );
+ assertEquals(emp2.getStartDate().getDate(), emp.getStartDate().getDate() );
+ assertEquals(emp2.getEndDate(), emp.getEndDate() );
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ Query sqlQuery = s.getNamedQuery("EmploymentAndPerson");
+ sqlQuery.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+ list = sqlQuery.list();
+ assertEquals(1,list.size() );
+ Object res = list.get(0);
+ assertClassAssignability(res.getClass(),Map.class);
+ Map m = (Map) res;
+ assertEquals(2,m.size());
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ sqlQuery = s.getNamedQuery("organizationreturnproperty");
+ sqlQuery.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+ list = sqlQuery.list();
+ assertEquals(2,list.size() );
+ m = (Map) list.get(0);
+ assertTrue(m.containsKey("org"));
+ assertClassAssignability(m.get("org").getClass(), Organization.class);
+ assertTrue(m.containsKey("emp"));
+ assertClassAssignability(m.get("emp").getClass(), Employment.class);
+ assertEquals(2, m.size());
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ namedQuery = s.getNamedQuery("EmploymentAndPerson");
+ list = namedQuery.list();
+ assertEquals(1,list.size() );
+ Object[] objs = (Object[]) list.get(0);
+ assertEquals(2, objs.length);
+ emp2 = (Employment) objs[0];
+ gavin = (Person) objs[1];
+ s.delete(emp2);
+ s.delete(jboss);
+ s.delete(gavin);
+ s.delete(ifa);
+ t.commit();
+ s.close();
+ }
+
+ /* test for native sql composite id joins which has never been implemented */
+ public void testCompositeIdJoinsFailureExpected() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Person person = new Person();
+ person.setName( "Noob" );
+
+ Product product = new Product();
+ product.setProductId( new Product.ProductId() );
+ product.getProductId().setOrgid( "x" );
+ product.getProductId().setProductnumber( "1234" );
+ product.setName( "Hibernate 3" );
+
+ Order order = new Order();
+ order.setOrderId( new Order.OrderId() );
+ order.getOrderId().setOrdernumber( "1" );
+ order.getOrderId().setOrgid( "y" );
+
+ product.getOrders().add( order );
+ order.setProduct( product );
+ order.setPerson( person );
+
+ s.save( product );
+ s.save( order);
+ s.save( person );
+
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ Product p = (Product) s.createQuery( "from Product p join fetch p.orders" ).list().get(0);
+ assertTrue(Hibernate.isInitialized( p.getOrders()));
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ Object[] o = (Object[]) s.createSQLQuery( "select\r\n" +
+ " product.orgid as {product.id.orgid}," +
+ " product.productnumber as {product.id.productnumber}," +
+ " {prod_orders}.orgid as orgid3_1_,\r\n" +
+ " {prod_orders}.ordernumber as ordernum2_3_1_,\r\n" +
+ " product.name as {product.name}," +
+ " {prod_orders.element.*}" +
+ /*" orders.PROD_NO as PROD4_3_1_,\r\n" +
+ " orders.person as person3_1_,\r\n" +
+ " orders.PROD_ORGID as PROD3_0__,\r\n" +
+ " orders.PROD_NO as PROD4_0__,\r\n" +
+ " orders.orgid as orgid0__,\r\n" +
+ " orders.ordernumber as ordernum2_0__ \r\n" +*/
+ " from\r\n" +
+ " Product product \r\n" +
+ " inner join\r\n" +
+ " TBL_ORDER {prod_orders} \r\n" +
+ " on product.orgid={prod_orders}.PROD_ORGID \r\n" +
+ " and product.productnumber={prod_orders}.PROD_NO" )
+ .addEntity( "product", Product.class )
+ .addJoin( "prod_orders", "product.orders" )
+ .list().get(0);
+
+ p = (Product) o[0];
+ assertTrue(Hibernate.isInitialized( p.getOrders() ));
+ assertNotNull(p.getOrders().iterator().next());
+ t.commit();
+ s.close();
+ }
+
+ public void testAutoDetectAliasing() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Organization ifa = new Organization("IFA");
+ Organization jboss = new Organization("JBoss");
+ Person gavin = new Person("Gavin");
+ Employment emp = new Employment(gavin, jboss, "AU");
+ Serializable orgId = s.save(jboss);
+ Serializable orgId2 = s.save(ifa);
+ s.save(gavin);
+ s.save(emp);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ List list = s.createSQLQuery( getEmploymentSQL() )
+ .addEntity( Employment.class.getName() )
+ .list();
+ assertEquals( 1,list.size() );
+
+ Employment emp2 = (Employment) list.get(0);
+ assertEquals(emp2.getEmploymentId(), emp.getEmploymentId() );
+ assertEquals(emp2.getStartDate().getDate(), emp.getStartDate().getDate() );
+ assertEquals(emp2.getEndDate(), emp.getEndDate() );
+
+ s.clear();
+
+ list = s.createSQLQuery( getEmploymentSQL() )
+ .addEntity( Employment.class.getName() )
+ .setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP)
+ .list();
+ assertEquals( 1,list.size() );
+ Map m = (Map) list.get(0);
+ assertTrue(m.containsKey("Employment"));
+ assertEquals(1,m.size());
+
+ list = s.createSQLQuery(getEmploymentSQL()).list();
+ assertEquals(1, list.size());
+ Object[] o = (Object[]) list.get(0);
+ assertEquals(8, o.length);
+
+ list = s.createSQLQuery( getEmploymentSQL() ).setResultTransformer( new UpperCasedAliasToEntityMapResultTransformer() ).list();
+ assertEquals(1, list.size());
+ m = (Map) list.get(0);
+ assertTrue(m.containsKey("EMPID"));
+ assertTrue(m.containsKey("VALUE"));
+ assertTrue(m.containsKey("ENDDATE"));
+ assertEquals(8, m.size());
+
+ list = s.createSQLQuery( getEmploymentSQLMixedScalarEntity() ).addScalar( "employerid" ).addEntity( Employment.class ).list();
+ assertEquals(1, list.size());
+ o = (Object[]) list.get(0);
+ assertEquals(2, o.length);
+ assertClassAssignability( o[0].getClass(), Number.class);
+ assertClassAssignability( o[1].getClass(), Employment.class);
+
+
+
+ Query queryWithCollection = s.getNamedQuery("organizationEmploymentsExplicitAliases");
+ queryWithCollection.setLong("id", jboss.getId() );
+ list = queryWithCollection.list();
+ assertEquals(list.size(),1);
+
+ s.clear();
+
+ list = s.createSQLQuery( getOrganizationJoinEmploymentSQL() )
+ .addEntity( "org", Organization.class )
+ .addJoin( "emp", "org.employments" )
+ .list();
+ assertEquals( 2,list.size() );
+
+ s.clear();
+
+ list = s.createSQLQuery( getOrganizationFetchJoinEmploymentSQL() )
+ .addEntity( "org", Organization.class )
+ .addJoin( "emp", "org.employments" )
+ .list();
+ assertEquals( 2,list.size() );
+
+ s.clear();
+
+ // TODO : why twice?
+ s.getNamedQuery( "organizationreturnproperty" ).list();
+ list = s.getNamedQuery( "organizationreturnproperty" ).list();
+ assertEquals( 2,list.size() );
+
+ s.clear();
+
+ list = s.getNamedQuery( "organizationautodetect" ).list();
+ assertEquals( 2,list.size() );
+
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ s.delete(emp2);
+
+ s.delete(jboss);
+ s.delete(gavin);
+ s.delete(ifa);
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ Dimension dim = new Dimension( 3, Integer.MAX_VALUE );
+ s.save( dim );
+ list = s.createSQLQuery( "select d_len * d_width as surface, d_len * d_width * 10 as volume from Dimension" ).list();
+ s.delete( dim );
+ t.commit();
+ s.close();
+
+ s = openSession();
+ t = s.beginTransaction();
+ SpaceShip enterprise = new SpaceShip();
+ enterprise.setModel( "USS" );
+ enterprise.setName( "Entreprise" );
+ enterprise.setSpeed( 50d );
+ Dimension d = new Dimension(45, 10);
+ enterprise.setDimensions( d );
+ s.save( enterprise );
+ Object[] result = (Object[]) s.getNamedQuery( "spaceship" ).uniqueResult();
+ enterprise = ( SpaceShip ) result[0];
+ assertTrue(50d == enterprise.getSpeed() );
+ assertTrue( 450d == extractDoubleValue( result[1] ) );
+ assertTrue( 4500d == extractDoubleValue( result[2] ) );
+ s.delete( enterprise );
+ t.commit();
+ s.close();
+
+ }
+
+ public void testMixAndMatchEntityScalar() {
+ Session s = openSession();
+ Transaction t = s.beginTransaction();
+ Speech speech = new Speech();
+ speech.setLength( new Double( 23d ) );
+ speech.setName( "Mine" );
+ s.persist( speech );
+ s.flush();
+ s.clear();
+
+ List l = s.createSQLQuery( "select name, id, flength, name as scalarName from Speech" )
+ .setResultSetMapping( "speech" )
+ .list();
+ assertEquals( l.size(), 1 );
+
+ t.rollback();
+ s.close();
+ }
+
+ private double extractDoubleValue(Object value) {
+ if ( value instanceof BigInteger ) {
+ return ( ( BigInteger ) value ).doubleValue();
+ }
+ else if ( value instanceof BigDecimal ) {
+ return ( ( BigDecimal ) value ).doubleValue();
+ }
+ else {
+ return Double.valueOf( value.toString() ).doubleValue();
+ }
+ }
+
+ private static class UpperCasedAliasToEntityMapResultTransformer extends BasicTransformerAdapter implements Serializable {
+ public Object transformTuple(Object[] tuple, String[] aliases) {
+ Map result = new HashMap( tuple.length );
+ for ( int i = 0; i < tuple.length; i++ ) {
+ String alias = aliases[i];
+ if ( alias != null ) {
+ result.put( alias.toUpperCase(), tuple[i] );
+ }
+ }
+ return result;
+ }
+ }
+}
Deleted: core/tags/hibernate-3.3.1.GA/testsuite/src/test/resources/log4j.properties
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/resources/log4j.properties 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/resources/log4j.properties 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,9 +0,0 @@
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-
-log4j.rootLogger=info, stdout
-
-log4j.logger.org.hibernate.test=info
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/testsuite/src/test/resources/log4j.properties (from rev 15175, core/branches/Branch_3_3/testsuite/src/test/resources/log4j.properties)
===================================================================
--- core/tags/hibernate-3.3.1.GA/testsuite/src/test/resources/log4j.properties (rev 0)
+++ core/tags/hibernate-3.3.1.GA/testsuite/src/test/resources/log4j.properties 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,10 @@
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+
+log4j.rootLogger=info, stdout
+
+log4j.logger.org.hibernate.test=info
+log4j.logger.org.hibernate.tool.hbm2ddl=debug
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/tutorials/eg/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/eg/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/tutorials/eg/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- ~ Hibernate, Relational Persistence for Idiomatic Java
- ~
- ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- ~ indicated by the @author tags or express copyright attribution
- ~ statements applied by the authors. All third-party contributions are
- ~ distributed under license by Red Hat Middleware LLC.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, as published by the Free Software Foundation.
- ~
- ~ This program is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- ~ for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public License
- ~ along with this distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-tutorials</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-tutorial-eg</artifactId>
- <packaging>jar</packaging>
-
- <name>Hibernate Example</name>
- <description>A simple example of Hibernate functionality</description>
-
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/tutorials/eg/pom.xml (from rev 15183, core/branches/Branch_3_3/tutorials/eg/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/tutorials/eg/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/tutorials/eg/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorials</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorial-eg</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate Example</name>
+ <description>A simple example of Hibernate functionality</description>
+
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/tutorials/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/tutorials/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,371 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ Hibernate, Relational Persistence for Idiomatic Java
- ~
- ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- ~ indicated by the @author tags or express copyright attribution
- ~ statements applied by the authors. All third-party contributions are
- ~ distributed under license by Red Hat Middleware LLC.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, as published by the Free Software Foundation.
- ~
- ~ This program is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- ~ for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public License
- ~ along with this distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-tutorials</artifactId>
- <packaging>pom</packaging>
-
- <name>Hibernate Tutorials</name>
- <description>Series of tutorials demonstrating Hibernate functionality</description>
-
- <modules>
- <module>eg</module>
- <module>web</module>
- </modules>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>hibernate-testing</artifactId>
- <version>${version}</version>
- </dependency>
- <!-- these are optional on core... :( -->
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.4.GA</version>
- </dependency>
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib</artifactId>
- <version>2.1_3</version>
- </dependency>
- <dependency>
- <groupId>asm</groupId>
- <artifactId>asm-attrs</artifactId>
- <version>1.5.3</version>
- </dependency>
- <!-- optional dom4j dependency; needed here for dom4j (de)serialization -->
- <dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <version>1.1</version>
- </dependency>
- <!-- the tutorials use HSQLDB -->
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- </dependency>
- <!-- logging setup -->
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- </dependencies>
-
- <build>
- <testResources>
- <testResource>
- <filtering>false</filtering>
- <directory>src/test/java</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </testResource>
- <testResource>
- <filtering>true</filtering>
- <directory>src/test/resources</directory>
- </testResource>
- </testResources>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <!-- HSQLDB is the default (eventually move to H2) -->
- <profile>
- <id>hsqldb</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <dependencies>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.HSQLDialect</db.dialect>
- <jdbc.driver>org.hsqldb.jdbcDriver</jdbc.driver>
- <jdbc.url>jdbc:hsqldb:target/test/db/hsqldb/hibernate</jdbc.url>
- <jdbc.user>sa</jdbc.user>
- <jdbc.pass />
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The H2 test envionment -->
- <profile>
- <id>h2</id>
- <dependencies>
- <dependency>
- <groupId>org.h2database</groupId>
- <artifactId>h2database</artifactId>
- <version>1.0.20061217</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
- <jdbc.driver>org.h2.Driver</jdbc.driver>
- <jdbc.url>jdbc:h2:mem:target/test/db/h2/hibernate</jdbc.url>
- <jdbc.user>sa</jdbc.user>
- <jdbc.pass />
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!--
- ###################################################################
- Profiles naming db instances in the Red Hat QA/QE lab
-
- First, those with OSS drivers
- ###################################################################
- -->
-
- <!-- The MySQL5 test envionment -->
- <profile>
- <id>mysql5</id>
- <dependencies>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.0.5</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
- <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
- <jdbc.url>jdbc:mysql://dev02.qa.atl.jboss.com/cruisecontrol</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The PostgreSQL test envionment -->
- <profile>
- <id>pgsql8</id>
- <dependencies>
- <dependency>
- <groupId>postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>8.2-504</version>
- <classifier>jdbc3</classifier>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.PostgreSQLDialect</db.dialect>
- <jdbc.driver>org.postgresql.Driver</jdbc.driver>
- <jdbc.url>jdbc:postgresql://dev01.qa.atl.jboss.com:5432:cruisecontrol</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!--
- ###################################################################
- Then, those with commercial drivers
- ###################################################################
- -->
-
- <!-- The Oracle9i test envionment -->
- <profile>
- <id>oracle9i</id>
- <dependencies>
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc14</artifactId>
- <!-- use the 10g drivers which are surprisingly largely bug free -->
- <version>10.0.2.0</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.Oracle9iDialect</db.dialect>
- <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
- <jdbc.url>jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The Oracle10g test envionment -->
- <profile>
- <id>oracle10g</id>
- <dependencies>
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc14</artifactId>
- <!-- use the 10g drivers which are surprisingly largely bug free -->
- <version>10.0.2.0</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
- <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
- <jdbc.url>jdbc:oracle:thin:@dev01.qa.atl.jboss.com:1521:qadb01</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The DB2 8.x test envionment (using 9x drivers)-->
- <profile>
- <id>db2-8</id>
- <dependencies>
- <dependency>
- <groupId>com.ibm</groupId>
- <artifactId>db2jcc</artifactId>
- <version>3.1.57</version>
- </dependency>
- <dependency>
- <groupId>com.ibm</groupId>
- <artifactId>db2jcc_license_cu</artifactId>
- <version>3.1.57</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.DB2Dialect</db.dialect>
- <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
- <jdbc.url>jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
- <jdbc.user>hiber</jdbc.user>
- <jdbc.pass>hiber</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The Sybase 12 test envionment -->
- <profile>
- <id>sybase12</id>
- <dependencies>
- <dependency>
- <groupId>com.sybase</groupId>
- <artifactId>jconnect</artifactId>
- <version>6.0.5</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.SybaseDialect</db.dialect>
- <jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
- <jdbc.url>jdbc:sybase:Tds:dev01.qa.atl.jboss.com:4100/cruisecontrol</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The SQLServer2005 (jTDS) test envionment -->
- <profile>
- <id>sqlserver-jtds</id>
- <dependencies>
- <dependency>
- <groupId>net.sourceforge.jtds</groupId>
- <artifactId>jtds</artifactId>
- <version>1.2</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
- <jdbc.driver>net.sourceforge.jtds.jdbc.Driver</jdbc.driver>
- <jdbc.url>jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/cruisecontrol</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation />
- </properties>
- </profile>
-
- <!-- The SQLServer2005 (MS JDBC) test envionment -->
- <profile>
- <id>sqlserver-msjdbc</id>
- <dependencies>
- <dependency>
- <groupId>com.microsoft.sqlserver</groupId>
- <artifactId>msjdbc</artifactId>
- <version>1.1</version>
- </dependency>
- </dependencies>
- <properties>
- <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
- <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
- <jdbc.url>jdbc:sqlserver://dev30.qa.atl.jboss.com:3918</jdbc.url>
- <jdbc.user>cruisecontrol</jdbc.user>
- <jdbc.pass>cruisecontrol</jdbc.pass>
- <jdbc.isolation>4096</jdbc.isolation>
- </properties>
- </profile>
-
- </profiles>
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/tutorials/pom.xml (from rev 15183, core/branches/Branch_3_3/tutorials/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/tutorials/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/tutorials/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,371 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ ~ for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public License
+ ~ along with this distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-parent</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorials</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Hibernate Tutorials</name>
+ <description>Series of tutorials demonstrating Hibernate functionality</description>
+
+ <modules>
+ <module>eg</module>
+ <module>web</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <!-- these are optional on core... :( -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.1_3</version>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm-attrs</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <!-- optional dom4j dependency; needed here for dom4j (de)serialization -->
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <!-- the tutorials use HSQLDB -->
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ </dependency>
+ <!-- logging setup -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>99.0-does-not-exist</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>99.0-does-not-exist</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <filtering>true</filtering>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <!-- HSQLDB is the default (eventually move to H2) -->
+ <profile>
+ <id>hsqldb</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.HSQLDialect</db.dialect>
+ <jdbc.driver>org.hsqldb.jdbcDriver</jdbc.driver>
+ <jdbc.url>jdbc:hsqldb:target/test/db/hsqldb/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass />
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The H2 test envionment -->
+ <profile>
+ <id>h2</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.h2database</groupId>
+ <artifactId>h2database</artifactId>
+ <version>1.0.20061217</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
+ <jdbc.driver>org.h2.Driver</jdbc.driver>
+ <jdbc.url>jdbc:h2:mem:target/test/db/h2/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass />
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!--
+ ###################################################################
+ Profiles naming db instances in the Red Hat QA/QE lab
+
+ First, those with OSS drivers
+ ###################################################################
+ -->
+
+ <!-- The MySQL5 test envionment -->
+ <profile>
+ <id>mysql5</id>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.0.5</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
+ <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:mysql://dev02.qa.atl.jboss.com/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The PostgreSQL test envionment -->
+ <profile>
+ <id>pgsql8</id>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.2-504</version>
+ <classifier>jdbc3</classifier>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.PostgreSQLDialect</db.dialect>
+ <jdbc.driver>org.postgresql.Driver</jdbc.driver>
+ <jdbc.url>jdbc:postgresql://dev01.qa.atl.jboss.com:5432:cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!--
+ ###################################################################
+ Then, those with commercial drivers
+ ###################################################################
+ -->
+
+ <!-- The Oracle9i test envionment -->
+ <profile>
+ <id>oracle9i</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle9iDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The Oracle10g test envionment -->
+ <profile>
+ <id>oracle10g</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev01.qa.atl.jboss.com:1521:qadb01</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The DB2 8.x test envionment (using 9x drivers)-->
+ <profile>
+ <id>db2-8</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc</artifactId>
+ <version>3.1.57</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc_license_cu</artifactId>
+ <version>3.1.57</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.DB2Dialect</db.dialect>
+ <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
+ <jdbc.url>jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
+ <jdbc.user>hiber</jdbc.user>
+ <jdbc.pass>hiber</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The Sybase 12 test envionment -->
+ <profile>
+ <id>sybase12</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.sybase</groupId>
+ <artifactId>jconnect</artifactId>
+ <version>6.0.5</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SybaseDialect</db.dialect>
+ <jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
+ <jdbc.url>jdbc:sybase:Tds:dev01.qa.atl.jboss.com:4100/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The SQLServer2005 (jTDS) test envionment -->
+ <profile>
+ <id>sqlserver-jtds</id>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.jtds</groupId>
+ <artifactId>jtds</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>net.sourceforge.jtds.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The SQLServer2005 (MS JDBC) test envionment -->
+ <profile>
+ <id>sqlserver-msjdbc</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>msjdbc</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
+ <jdbc.url>jdbc:sqlserver://dev30.qa.atl.jboss.com:3918</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation>4096</jdbc.isolation>
+ </properties>
+ </profile>
+
+ </profiles>
+</project>
\ No newline at end of file
Deleted: core/tags/hibernate-3.3.1.GA/tutorials/web/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/web/pom.xml 2008-08-14 15:58:54 UTC (rev 15071)
+++ core/tags/hibernate-3.3.1.GA/tutorials/web/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -1,27 +0,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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-tutorials</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-tutorial-web</artifactId>
- <packaging>war</packaging>
-
- <name>Hibernate Web Tutorial</name>
- <description>A webapp-based tutorial project showcasing Hibernate usage</description>
-
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.3</version>
- </dependency>
- </dependencies>
-
-</project>
\ No newline at end of file
Copied: core/tags/hibernate-3.3.1.GA/tutorials/web/pom.xml (from rev 15183, core/branches/Branch_3_3/tutorials/web/pom.xml)
===================================================================
--- core/tags/hibernate-3.3.1.GA/tutorials/web/pom.xml (rev 0)
+++ core/tags/hibernate-3.3.1.GA/tutorials/web/pom.xml 2008-09-10 18:18:44 UTC (rev 15184)
@@ -0,0 +1,27 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorials</artifactId>
+ <version>3.3.1.GA</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorial-web</artifactId>
+ <packaging>war</packaging>
+
+ <name>Hibernate Web Tutorial</name>
+ <description>A webapp-based tutorial project showcasing Hibernate usage</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.3</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
16 years, 3 months
Hibernate SVN: r15183 - in core/branches/Branch_3_3: cache-ehcache and 18 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 14:18:15 -0400 (Wed, 10 Sep 2008)
New Revision: 15183
Modified:
core/branches/Branch_3_3/cache-ehcache/pom.xml
core/branches/Branch_3_3/cache-jbosscache/pom.xml
core/branches/Branch_3_3/cache-jbosscache2/pom.xml
core/branches/Branch_3_3/cache-oscache/pom.xml
core/branches/Branch_3_3/cache-swarmcache/pom.xml
core/branches/Branch_3_3/connection-c3p0/pom.xml
core/branches/Branch_3_3/connection-proxool/pom.xml
core/branches/Branch_3_3/core/pom.xml
core/branches/Branch_3_3/distribution/pom.xml
core/branches/Branch_3_3/documentation/manual/pom.xml
core/branches/Branch_3_3/documentation/pom.xml
core/branches/Branch_3_3/documentation/releasenotes/pom.xml
core/branches/Branch_3_3/jmx/pom.xml
core/branches/Branch_3_3/parent/pom.xml
core/branches/Branch_3_3/pom.xml
core/branches/Branch_3_3/testing/pom.xml
core/branches/Branch_3_3/testsuite/pom.xml
core/branches/Branch_3_3/tutorials/eg/pom.xml
core/branches/Branch_3_3/tutorials/pom.xml
core/branches/Branch_3_3/tutorials/web/pom.xml
Log:
[maven-release-plugin] prepare release hibernate-3.3.1.GA
Modified: core/branches/Branch_3_3/cache-ehcache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-ehcache/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/cache-ehcache/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/cache-jbosscache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/cache-jbosscache/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/cache-jbosscache2/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/cache-oscache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-oscache/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/cache-oscache/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/cache-swarmcache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-swarmcache/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/cache-swarmcache/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/connection-c3p0/pom.xml
===================================================================
--- core/branches/Branch_3_3/connection-c3p0/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/connection-c3p0/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/connection-proxool/pom.xml
===================================================================
--- core/branches/Branch_3_3/connection-proxool/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/connection-proxool/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/core/pom.xml
===================================================================
--- core/branches/Branch_3_3/core/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/core/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/distribution/pom.xml
===================================================================
--- core/branches/Branch_3_3/distribution/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/distribution/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/documentation/manual/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/manual/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/documentation/manual/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/documentation/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/documentation/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/documentation/releasenotes/pom.xml
===================================================================
--- core/branches/Branch_3_3/documentation/releasenotes/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/documentation/releasenotes/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/jmx/pom.xml
===================================================================
--- core/branches/Branch_3_3/jmx/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/jmx/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/parent/pom.xml
===================================================================
--- core/branches/Branch_3_3/parent/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/parent/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -32,7 +32,7 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
<packaging>pom</packaging>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<name>Hibernate Core Parent POM</name>
<description>The base POM for all Hibernate Core modules.</description>
@@ -53,9 +53,9 @@
</licenses>
<scm>
- <connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</developerConnection>
- <url>https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_3</url>
+ <connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</developerConnection>
+ <url>https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.1.GA</url>
</scm>
<ciManagement>
Modified: core/branches/Branch_3_3/pom.xml
===================================================================
--- core/branches/Branch_3_3/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/testing/pom.xml
===================================================================
--- core/branches/Branch_3_3/testing/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/testing/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/testsuite/pom.xml
===================================================================
--- core/branches/Branch_3_3/testsuite/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/testsuite/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/tutorials/eg/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/eg/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/tutorials/eg/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tutorials</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/tutorials/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/tutorials/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -31,7 +31,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-parent</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
Modified: core/branches/Branch_3_3/tutorials/web/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/web/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
+++ core/branches/Branch_3_3/tutorials/web/pom.xml 2008-09-10 18:18:15 UTC (rev 15183)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tutorials</artifactId>
- <version>3.3.1-SNAPSHOT</version>
+ <version>3.3.1.GA</version>
<relativePath>../pom.xml</relativePath>
</parent>
16 years, 3 months
Hibernate SVN: r15182 - in core/branches/Branch_3_3: parent and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 14:12:19 -0400 (Wed, 10 Sep 2008)
New Revision: 15182
Modified:
core/branches/Branch_3_3/cache-jbosscache2/pom.xml
core/branches/Branch_3_3/parent/pom.xml
core/branches/Branch_3_3/tutorials/pom.xml
Log:
account for jcl104-over-slf4j artifact renaming to jcl-over-slf4j
Modified: core/branches/Branch_3_3/cache-jbosscache2/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2008-09-10 18:12:01 UTC (rev 15181)
+++ core/branches/Branch_3_3/cache-jbosscache2/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
@@ -41,36 +41,6 @@
<version>1.8.0.2</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <scope>test</scope>
- </dependency>
<!-- this is optional on core :( and needed for testing -->
<dependency>
<groupId>javassist</groupId>
Modified: core/branches/Branch_3_3/parent/pom.xml
===================================================================
--- core/branches/Branch_3_3/parent/pom.xml 2008-09-10 18:12:01 UTC (rev 15181)
+++ core/branches/Branch_3_3/parent/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
@@ -287,7 +287,7 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
+ <artifactId>jcl-over-slf4j</artifactId>
<version>1.5.2</version>
<scope>test</scope>
</dependency>
Modified: core/branches/Branch_3_3/tutorials/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/pom.xml 2008-09-10 18:12:01 UTC (rev 15181)
+++ core/branches/Branch_3_3/tutorials/pom.xml 2008-09-10 18:12:19 UTC (rev 15182)
@@ -88,30 +88,30 @@
</dependency>
<!-- logging setup -->
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
- <version>1.4.2</version>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
+ <version>1.5.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>99.0-does-not-exist</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>99.0-does-not-exist</version>
+ </dependency>
</dependencies>
<build>
16 years, 3 months
Hibernate SVN: r15181 - in core/trunk: parent and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 14:12:01 -0400 (Wed, 10 Sep 2008)
New Revision: 15181
Modified:
core/trunk/cache-jbosscache2/pom.xml
core/trunk/parent/pom.xml
core/trunk/tutorials/pom.xml
Log:
account for jcl104-over-slf4j artifact renaming to jcl-over-slf4j
Modified: core/trunk/cache-jbosscache2/pom.xml
===================================================================
--- core/trunk/cache-jbosscache2/pom.xml 2008-09-10 17:56:19 UTC (rev 15180)
+++ core/trunk/cache-jbosscache2/pom.xml 2008-09-10 18:12:01 UTC (rev 15181)
@@ -41,36 +41,6 @@
<version>1.8.0.2</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <scope>test</scope>
- </dependency>
<!-- this is optional on core :( and needed for testing -->
<dependency>
<groupId>javassist</groupId>
Modified: core/trunk/parent/pom.xml
===================================================================
--- core/trunk/parent/pom.xml 2008-09-10 17:56:19 UTC (rev 15180)
+++ core/trunk/parent/pom.xml 2008-09-10 18:12:01 UTC (rev 15181)
@@ -287,7 +287,7 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
+ <artifactId>jcl-over-slf4j</artifactId>
<version>1.5.2</version>
<scope>test</scope>
</dependency>
Modified: core/trunk/tutorials/pom.xml
===================================================================
--- core/trunk/tutorials/pom.xml 2008-09-10 17:56:19 UTC (rev 15180)
+++ core/trunk/tutorials/pom.xml 2008-09-10 18:12:01 UTC (rev 15181)
@@ -88,18 +88,8 @@
</dependency>
<!-- logging setup -->
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>99.0-does-not-exist</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-api</artifactId>
- <version>99.0-does-not-exist</version>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
- <artifactId>jcl104-over-slf4j</artifactId>
+ <artifactId>jcl-over-slf4j</artifactId>
<version>1.4.2</version>
</dependency>
<dependency>
@@ -112,6 +102,16 @@
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>99.0-does-not-exist</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>99.0-does-not-exist</version>
+ </dependency>
</dependencies>
<build>
16 years, 3 months
Hibernate SVN: r15180 - core/branches/Branch_3_2/test/org/hibernate/test/idgen/enhanced.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 13:56:19 -0400 (Wed, 10 Sep 2008)
New Revision: 15180
Modified:
core/branches/Branch_3_2/test/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
Log:
test suite cleanups
Modified: core/branches/Branch_3_2/test/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-09-10 17:55:47 UTC (rev 15179)
+++ core/branches/Branch_3_2/test/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-09-10 17:56:19 UTC (rev 15180)
@@ -66,15 +66,15 @@
Properties props = new Properties();
props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "10" );
- // for dialects which do not support pooled sequences, we default to hilo
+ // for dialects which do not support pooled sequences, we default to pooled+table
Dialect dialect = new SequenceDialect();
SequenceStyleGenerator generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
- // for dialects which do support pooled sequences, we default to pooled
+ // for dialects which do support pooled sequences, we default to pooled+sequence
dialect = new PooledSequenceDialect();
generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
@@ -118,7 +118,7 @@
*/
public void testExplicitOptimizerWithExplicitIncrementSize() {
// with sequence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Dialect dialect = new SequenceDialect();
+ final Dialect dialect = new SequenceDialect();
// optimizer=none w/ increment > 1 => should honor optimizer
Properties props = new Properties();
@@ -134,7 +134,8 @@
// optimizer=hilo w/ increment > 1 => hilo
props = new Properties();
props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.HILO );
- props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );generator = new SequenceStyleGenerator();
+ props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
+ generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
@@ -147,10 +148,13 @@
props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
+ // because the dialect reports to not support pooled seqyences, the expectation is that we will
+ // use a table for the backing structure...
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
assertEquals( 20, generator.getOptimizer().getIncrementSize() );
assertEquals( 20, generator.getDatabaseStructure().getIncrementSize() );
+
}
private static class TableDialect extends Dialect {
16 years, 3 months
Hibernate SVN: r15179 - in core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test: idgen/enhanced and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 13:55:47 -0400 (Wed, 10 Sep 2008)
New Revision: 15179
Modified:
core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
Log:
test suite cleanups
Modified: core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2008-09-10 17:53:46 UTC (rev 15178)
+++ core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2008-09-10 17:55:47 UTC (rev 15179)
@@ -1716,7 +1716,7 @@
session = openSession();
results = session.createQuery( "select a from Animal a, Animal b order by a.id" )
- .setResultTransformer(new DistinctRootEntityResultTransformer())
+ .setResultTransformer( DistinctRootEntityResultTransformer.INSTANCE )
.list();
assertEquals( "Incorrect result size", 2, results.size());
assertTrue( "Incorrect return type", results.get(0) instanceof Animal );
Modified: core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
===================================================================
--- core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-09-10 17:53:46 UTC (rev 15178)
+++ core/branches/Branch_3_3/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-09-10 17:55:47 UTC (rev 15179)
@@ -66,15 +66,15 @@
Properties props = new Properties();
props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "10" );
- // for dialects which do not support pooled sequences, we default to hilo
+ // for dialects which do not support pooled sequences, we default to pooled+table
Dialect dialect = new SequenceDialect();
SequenceStyleGenerator generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
- // for dialects which do support pooled sequences, we default to pooled
+ // for dialects which do support pooled sequences, we default to pooled+sequence
dialect = new PooledSequenceDialect();
generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
@@ -118,7 +118,7 @@
*/
public void testExplicitOptimizerWithExplicitIncrementSize() {
// with sequence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Dialect dialect = new SequenceDialect();
+ final Dialect dialect = new SequenceDialect();
// optimizer=none w/ increment > 1 => should honor optimizer
Properties props = new Properties();
@@ -134,7 +134,8 @@
// optimizer=hilo w/ increment > 1 => hilo
props = new Properties();
props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.HILO );
- props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );generator = new SequenceStyleGenerator();
+ props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
+ generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
@@ -147,8 +148,10 @@
props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
+ // because the dialect reports to not support pooled seqyences, the expectation is that we will
+ // use a table for the backing structure...
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
assertEquals( 20, generator.getOptimizer().getIncrementSize() );
assertEquals( 20, generator.getDatabaseStructure().getIncrementSize() );
16 years, 3 months
Hibernate SVN: r15178 - in core/trunk/testsuite/src/test: java/org/hibernate/test/hql and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 13:53:46 -0400 (Wed, 10 Sep 2008)
New Revision: 15178
Modified:
core/trunk/testsuite/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
core/trunk/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
core/trunk/testsuite/src/test/resources/log4j.properties
Log:
test suite cleanups
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java 2008-09-10 17:11:17 UTC (rev 15177)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java 2008-09-10 17:53:46 UTC (rev 15178)
@@ -279,7 +279,7 @@
session.enableFilter( "effectiveDate" ).setParameter( "asOfDate", new Date() );
Product prod = ( Product ) session.createCriteria( Product.class )
- .setResultTransformer( new DistinctRootEntityResultTransformer() )
+ .setResultTransformer( DistinctRootEntityResultTransformer.INSTANCE )
.add( Restrictions.eq( "id", testData.prod1Id ) )
.uniqueResult();
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2008-09-10 17:11:17 UTC (rev 15177)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/hql/ASTParserLoadingTest.java 2008-09-10 17:53:46 UTC (rev 15178)
@@ -1716,7 +1716,7 @@
session = openSession();
results = session.createQuery( "select a from Animal a, Animal b order by a.id" )
- .setResultTransformer(new DistinctRootEntityResultTransformer())
+ .setResultTransformer( DistinctRootEntityResultTransformer.INSTANCE )
.list();
assertEquals( "Incorrect result size", 2, results.size());
assertTrue( "Incorrect return type", results.get(0) instanceof Animal );
Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-09-10 17:11:17 UTC (rev 15177)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java 2008-09-10 17:53:46 UTC (rev 15178)
@@ -66,15 +66,15 @@
Properties props = new Properties();
props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "10" );
- // for dialects which do not support pooled sequences, we default to hilo
+ // for dialects which do not support pooled sequences, we default to pooled+table
Dialect dialect = new SequenceDialect();
SequenceStyleGenerator generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
assertEquals( SequenceStyleGenerator.DEF_SEQUENCE_NAME, generator.getDatabaseStructure().getName() );
- // for dialects which do support pooled sequences, we default to pooled
+ // for dialects which do support pooled sequences, we default to pooled+sequence
dialect = new PooledSequenceDialect();
generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
@@ -118,7 +118,7 @@
*/
public void testExplicitOptimizerWithExplicitIncrementSize() {
// with sequence ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Dialect dialect = new SequenceDialect();
+ final Dialect dialect = new SequenceDialect();
// optimizer=none w/ increment > 1 => should honor optimizer
Properties props = new Properties();
@@ -134,7 +134,8 @@
// optimizer=hilo w/ increment > 1 => hilo
props = new Properties();
props.setProperty( SequenceStyleGenerator.OPT_PARAM, OptimizerFactory.HILO );
- props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );generator = new SequenceStyleGenerator();
+ props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
+ generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
@@ -147,8 +148,10 @@
props.setProperty( SequenceStyleGenerator.INCREMENT_PARAM, "20" );
generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
- assertClassAssignability( SequenceStructure.class, generator.getDatabaseStructure().getClass() );
- assertClassAssignability( OptimizerFactory.HiLoOptimizer.class, generator.getOptimizer().getClass() );
+ // because the dialect reports to not support pooled seqyences, the expectation is that we will
+ // use a table for the backing structure...
+ assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() );
+ assertClassAssignability( OptimizerFactory.PooledOptimizer.class, generator.getOptimizer().getClass() );
assertEquals( 20, generator.getOptimizer().getIncrementSize() );
assertEquals( 20, generator.getDatabaseStructure().getIncrementSize() );
Modified: core/trunk/testsuite/src/test/resources/log4j.properties
===================================================================
--- core/trunk/testsuite/src/test/resources/log4j.properties 2008-09-10 17:11:17 UTC (rev 15177)
+++ core/trunk/testsuite/src/test/resources/log4j.properties 2008-09-10 17:53:46 UTC (rev 15178)
@@ -6,4 +6,5 @@
log4j.rootLogger=info, stdout
-log4j.logger.org.hibernate.test=info
\ No newline at end of file
+log4j.logger.org.hibernate.test=info
+log4j.logger.org.hibernate.tool.hbm2ddl=debug
16 years, 3 months
Hibernate SVN: r15177 - in core/branches/Branch_3_3: documentation/manual/src/main/docbook/en-US and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-09-10 13:11:17 -0400 (Wed, 10 Sep 2008)
New Revision: 15177
Modified:
core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environment.java
core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml
Log:
prep 3.3.1 release
Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environment.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environment.java 2008-09-10 17:07:39 UTC (rev 15176)
+++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/cfg/Environment.java 2008-09-10 17:11:17 UTC (rev 15177)
@@ -176,7 +176,7 @@
*/
public final class Environment {
- public static final String VERSION = "3.3.0.SP1";
+ public static final String VERSION = "3.3.1.GA";
/**
* <tt>ConnectionProvider</tt> implementor to use when obtaining connections
Modified: core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml
===================================================================
--- core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml 2008-09-10 17:07:39 UTC (rev 15176)
+++ core/branches/Branch_3_3/documentation/manual/src/main/docbook/en-US/Hibernate_Reference.xml 2008-09-10 17:11:17 UTC (rev 15177)
@@ -23,7 +23,7 @@
~ Boston, MA 02110-1301 USA
-->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY versionNumber "3.3.0.SP1">
+ <!ENTITY versionNumber "3.3.1">
<!ENTITY copyrightYear "2004">
<!ENTITY copyrightHolder "Red Hat Middleware, LLC.">
]>
16 years, 3 months