Hibernate SVN: r10340 - branches/Branch_3_2/Hibernate3
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-08-24 11:09:34 -0400 (Thu, 24 Aug 2006)
New Revision: 10340
Modified:
branches/Branch_3_2/Hibernate3/changelog.txt
Log:
prep 3.2.0.cr4
Modified: branches/Branch_3_2/Hibernate3/changelog.txt
===================================================================
--- branches/Branch_3_2/Hibernate3/changelog.txt 2006-08-24 15:07:03 UTC (rev 10339)
+++ branches/Branch_3_2/Hibernate3/changelog.txt 2006-08-24 15:09:34 UTC (rev 10340)
@@ -5,6 +5,54 @@
refer to the particular case on JIRA using the issue tracking number to learn
more about each case.
+
+Chages in version 3.2.0.cr4 (2006.08.24)
+-------------------------------------------
+
+** 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)
-------------------------------------------
17 years, 9 months
Hibernate SVN: r10339 - branches/Branch_3_2/Hibernate3/src/org/hibernate/transaction
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-08-24 11:07:03 -0400 (Thu, 24 Aug 2006)
New Revision: 10339
Modified:
branches/Branch_3_2/Hibernate3/src/org/hibernate/transaction/JTATransactionFactory.java
Log:
HHH-2023 : JTATransactionFactory.isTransactionInProgress()
Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/transaction/JTATransactionFactory.java
===================================================================
--- branches/Branch_3_2/Hibernate3/src/org/hibernate/transaction/JTATransactionFactory.java 2006-08-24 13:36:42 UTC (rev 10338)
+++ branches/Branch_3_2/Hibernate3/src/org/hibernate/transaction/JTATransactionFactory.java 2006-08-24 15:07:03 UTC (rev 10339)
@@ -74,19 +74,34 @@
Context transactionContext,
Transaction transaction) {
try {
- UserTransaction ut;
- if ( transaction != null ) {
- ut = ( ( JTATransaction ) transaction ).getUserTransaction();
- }
- else {
- try {
- ut = ( UserTransaction ) context.lookup( utName );
+ // Essentially:
+ // 1) If we have a local (Hibernate) transaction in progress
+ // and it already has the UserTransaction cached, use that
+ // UserTransaction to determine the status.
+ // 2) If a transaction manager has been located, use
+ // that transaction manager to determine the status.
+ // 3) Finally, as the last resort, try to lookup the
+ // UserTransaction via JNDI and use that to determine the
+ // status.
+ if ( transaction != null ) {
+ UserTransaction ut = ( ( JTATransaction ) transaction ).getUserTransaction();
+ if ( ut != null ) {
+ return JTAHelper.isInProgress( ut.getStatus() );
+ }
+ }
+
+ if ( jdbcContext.getFactory().getTransactionManager() != null ) {
+ return JTAHelper.isInProgress( jdbcContext.getFactory().getTransactionManager().getStatus() );
+ }
+ else {
+ try {
+ UserTransaction ut = ( UserTransaction ) context.lookup( utName );
+ return ut != null && JTAHelper.isInProgress( ut.getStatus() );
}
catch ( NamingException ne ) {
throw new TransactionException( "Unable to locate UserTransaction to check status", ne );
}
- }
- return ut != null && JTAHelper.isInProgress( ut.getStatus() );
+ }
}
catch( SystemException se ) {
throw new TransactionException( "Unable to check transaction status", se );
17 years, 9 months
Hibernate SVN: r10338 - tags/v32cr4
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-08-24 09:36:42 -0400 (Thu, 24 Aug 2006)
New Revision: 10338
Added:
tags/v32cr4/Hibernate3/
Log:
tagged 3.2.0.cr4 release
Copied: tags/v32cr4/Hibernate3 (from rev 10337, branches/Branch_3_2/Hibernate3)
17 years, 9 months
Hibernate SVN: r10337 - tags
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2006-08-24 09:35:37 -0400 (Thu, 24 Aug 2006)
New Revision: 10337
Added:
tags/v32cr4/
Log:
created tag directory for 3.2.0.cr4 release
17 years, 9 months
Hibernate SVN: r10336 - in trunk/HibernateExt/tools/doc/reference/en: . modules
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2006-08-24 06:30:41 -0400 (Thu, 24 Aug 2006)
New Revision: 10336
Modified:
trunk/HibernateExt/tools/doc/reference/en/master.xml
trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml
Log:
doc
Modified: trunk/HibernateExt/tools/doc/reference/en/master.xml
===================================================================
--- trunk/HibernateExt/tools/doc/reference/en/master.xml 2006-08-24 10:30:15 UTC (rev 10335)
+++ trunk/HibernateExt/tools/doc/reference/en/master.xml 2006-08-24 10:30:41 UTC (rev 10336)
@@ -14,7 +14,7 @@
<subtitle>Reference Guide</subtitle>
- <releaseinfo>3.2.0.beta6</releaseinfo>
+ <releaseinfo>3.2.0.beta7</releaseinfo>
<mediaobject>
<imageobject>
Modified: trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml
===================================================================
--- trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml 2006-08-24 10:30:15 UTC (rev 10335)
+++ trunk/HibernateExt/tools/doc/reference/en/modules/ant.xml 2006-08-24 10:30:41 UTC (rev 10336)
@@ -13,6 +13,16 @@
This jar is 100% independent from the eclipse platform and can thus be
used independently of eclipse.</para>
+ <para>
+ Note: until Hibernate 3.2 and related libraries are finally
+ released there might be incompabilities with respect to the tools.
+ Thus to avoid any confusion it is recommended to use the
+ hibernate3.jar & hibernate-annotations.jar bundled with the
+ tools when you want to use the Ant tasks. Do not worry about using
+ e.g. Hibernate 3.2 jar's with e.g. an Hibernate 3.1 project since
+ the output generated will work with previous Hibernate 3 versions.
+ </para>
+
<section>
<title>The <literal><hibernatetool></literal> ant Task</title>
@@ -357,6 +367,8 @@
<area coords="4 57" id="xcfg2" />
<area coords="5 57" id="xcfg3" />
+ <area coords="6 57" id="xcfg4" />
+ <area coords="7 57" id="xcfg5" />
</areaspec>
<programlisting><![CDATA[<jdbcconfiguration
@@ -364,19 +376,21 @@
packagename="package.name"
revengfile="hibernate.reveng.xml"
reversestrategy="ReverseEngineeringStrategy classname"
+ detectmanytomany="true|false"
+ detectoptmisticlock="true|false"
>
...
</jdbcconfiguration>]]></programlisting>
<calloutlist>
<callout arearefs="xcfg1">
- <para>packagename (optional): The default package name to use
+ <para><literal>packagename</literal> (optional): The default package name to use
when mappings for classes is created</para>
</callout>
<callout arearefs="xcfg2">
<para><literal>revengfile</literal> (optional): name of
- reveng.xml that allows you to control varios aspects of the
+ reveng.xml that allows you to control various aspects of the
reverse engineering.</para>
</callout>
@@ -390,6 +404,13 @@
addition to) a reveng.xml file gives you full programmatic
control of the reverse engineering.</para>
</callout>
+
+ <callout arearefs="xcfg4">
+ <para>detectManytoMany (default:true): If true (the default) tables which are pure many-to-many link tables will be mapped as such. A pure many-to-many table is one which primary-key contains has exactly two foreign-keys pointing to other entity tables and has no other columns.</para>
+ </callout>
+ <callout arearefs="xcfg5">
+ <para>detectOptimisticLock (efault:true): If true columns named VERSION or TIMESTAMP with appropriate types will be mapped with the apropriate optimistic locking corresponding to <literal><version></literal> or <literal><timestamp></literal></para>
+ </callout>
</calloutlist>
</programlistingco></para>
17 years, 9 months
Hibernate SVN: r10335 - trunk/HibernateExt/tools/src/java/org/hibernate/cfg
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2006-08-24 06:30:15 -0400 (Thu, 24 Aug 2006)
New Revision: 10335
Modified:
trunk/HibernateExt/tools/src/java/org/hibernate/cfg/JDBCReaderFactory.java
Log:
todo
Modified: trunk/HibernateExt/tools/src/java/org/hibernate/cfg/JDBCReaderFactory.java
===================================================================
--- trunk/HibernateExt/tools/src/java/org/hibernate/cfg/JDBCReaderFactory.java 2006-08-24 10:30:07 UTC (rev 10334)
+++ trunk/HibernateExt/tools/src/java/org/hibernate/cfg/JDBCReaderFactory.java 2006-08-24 10:30:15 UTC (rev 10335)
@@ -19,6 +19,7 @@
.getSQLExceptionConverter(), settings.getDefaultCatalogName(), settings.getDefaultSchemaName(), revengStrategy );
}
+ //TODO: how to get the current dialect to decide depenendent on the dialect.
public static MetaDataDialect newMetaDataDialect(Properties cfg) {
String property = cfg.getProperty( "hibernatetool.metadatadialect" );
if ( property != null ) {
17 years, 9 months
Hibernate SVN: r10334 - trunk/HibernateExt/tools/src/test/org/hibernate/tool
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2006-08-24 06:30:07 -0400 (Thu, 24 Aug 2006)
New Revision: 10334
Modified:
trunk/HibernateExt/tools/src/test/org/hibernate/tool/BaseTestCase.java
trunk/HibernateExt/tools/src/test/org/hibernate/tool/NonReflectiveTestCase.java
Log:
testcleanup
Modified: trunk/HibernateExt/tools/src/test/org/hibernate/tool/BaseTestCase.java
===================================================================
--- trunk/HibernateExt/tools/src/test/org/hibernate/tool/BaseTestCase.java 2006-08-24 10:29:31 UTC (rev 10333)
+++ trunk/HibernateExt/tools/src/test/org/hibernate/tool/BaseTestCase.java 2006-08-24 10:30:07 UTC (rev 10334)
@@ -115,6 +115,24 @@
public boolean appliesTo(Dialect dialect) {
return true;
}
+
+ /**
+ * @return
+ */
+ protected String getBaseForMappings() {
+ return "org/hibernate/tool/";
+ }
+
+
+ protected void addMappings(String[] files, Configuration cfg) {
+ for (int i=0; i<files.length; i++) {
+ if ( !files[i].startsWith("net/") ) {
+ files[i] = getBaseForMappings() + files[i];
+ }
+ //System.out.println("bc in " + this.getClass() + " " + getBaseForMappings() + " " + files[i]);
+ cfg.addResource( files[i], this.getClass().getClassLoader() );
+ }
+ }
}
Modified: trunk/HibernateExt/tools/src/test/org/hibernate/tool/NonReflectiveTestCase.java
===================================================================
--- trunk/HibernateExt/tools/src/test/org/hibernate/tool/NonReflectiveTestCase.java 2006-08-24 10:29:31 UTC (rev 10333)
+++ trunk/HibernateExt/tools/src/test/org/hibernate/tool/NonReflectiveTestCase.java 2006-08-24 10:30:07 UTC (rev 10334)
@@ -2,6 +2,7 @@
package org.hibernate.tool;
import java.io.File;
+import java.util.Iterator;
import org.hibernate.HibernateException;
import org.hibernate.Interceptor;
@@ -10,6 +11,9 @@
import org.hibernate.cfg.Environment;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.mapping.ForeignKey;
+import org.hibernate.mapping.Index;
+import org.hibernate.mapping.Table;
import org.hibernate.tool.test.TestHelper;
public abstract class NonReflectiveTestCase extends BaseTestCase {
@@ -44,14 +48,9 @@
cfg.setProperty(Environment.HBM2DDL_AUTO, "create-drop");
}
- for (int i=0; i<files.length; i++) {
- if ( !files[i].startsWith("net/") ) {
- files[i] = getBaseForMappings() + files[i];
- }
- //System.out.println("bc in " + this.getClass() + " " + getBaseForMappings() + " " + files[i]);
- getCfg().addResource( files[i], this.getClass().getClassLoader() );
- }
-
+ Configuration cfg2 = getCfg();
+ addMappings( files, cfg2 );
+
/*if ( getCacheConcurrencyStrategy()!=null ) {
Iterator iter = cfg.getClassMappings();
@@ -87,16 +86,9 @@
}*/
setDialect( Dialect.getDialect() );
- getCfg().buildMappings();
+ cfg2.buildMappings();
}
- /**
- * @return
- */
- protected String getBaseForMappings() {
- return "org/hibernate/tool/";
- }
-
public String getCacheConcurrencyStrategy() {
return "nonstrict-read-write";
}
17 years, 9 months
Hibernate SVN: r10333 - trunk/HibernateExt/tools/src/testsupport
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2006-08-24 06:29:31 -0400 (Thu, 24 Aug 2006)
New Revision: 10333
Modified:
trunk/HibernateExt/tools/src/testsupport/anttest-build.xml
Log:
test for manytomany in ant
Modified: trunk/HibernateExt/tools/src/testsupport/anttest-build.xml
===================================================================
--- trunk/HibernateExt/tools/src/testsupport/anttest-build.xml 2006-08-24 10:29:05 UTC (rev 10332)
+++ trunk/HibernateExt/tools/src/testsupport/anttest-build.xml 2006-08-24 10:29:31 UTC (rev 10333)
@@ -59,7 +59,7 @@
)
</sql> -->
<hibernatetool destdir="${build.dir}/bottomup">
- <jdbcconfiguration propertyfile="../../etc/hibernate.properties" />
+ <jdbcconfiguration propertyfile="../../etc/hibernate.properties" detectManyToMany="true" detectoptimisticlock="true"/>
<hbm2java />
<hbm2java templatepath="templates" />
17 years, 9 months
Hibernate SVN: r10332 - trunk/HibernateExt/tools/src/java/org/hibernate/cfg/reveng
by hibernate-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2006-08-24 06:29:05 -0400 (Thu, 24 Aug 2006)
New Revision: 10332
Modified:
trunk/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java
Log:
fix AOOB bug in manytomany detection
Modified: trunk/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java
===================================================================
--- trunk/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java 2006-08-24 04:51:33 UTC (rev 10331)
+++ trunk/HibernateExt/tools/src/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java 2006-08-24 10:29:05 UTC (rev 10332)
@@ -210,9 +210,9 @@
return false; // early exit if we have more than two fk.
}
}
-/* if(foreignKeys.size()!=2) {
+ if(foreignKeys.size()!=2) {
return false;
- }*/
+ }
Set columns = new HashSet();
Iterator columnIterator = table.getColumnIterator();
17 years, 9 months
Hibernate SVN: r10331 - trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2006-08-24 00:51:33 -0400 (Thu, 24 Aug 2006)
New Revision: 10331
Modified:
trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/CollectionBinder.java
trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/MapBinder.java
Log:
ANN-419 add SortedMap support
Modified: trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/CollectionBinder.java
===================================================================
--- trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2006-08-24 04:43:46 UTC (rev 10330)
+++ trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2006-08-24 04:51:33 UTC (rev 10331)
@@ -198,6 +198,9 @@
else if ( java.util.Map.class.equals( returnedClass ) ) {
return new MapBinder();
}
+ else if ( java.util.SortedMap.class.equals( returnedClass ) ) {
+ return new MapBinder(true);
+ }
else if ( java.util.Collection.class.equals( returnedClass ) ) {
if ( property.isAnnotationPresent( CollectionId.class ) ) {
return new IdBagBinder();
Modified: trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/MapBinder.java
===================================================================
--- trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/MapBinder.java 2006-08-24 04:43:46 UTC (rev 10330)
+++ trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/MapBinder.java 2006-08-24 04:51:33 UTC (rev 10331)
@@ -53,7 +53,14 @@
* @author Emmanuel Bernard
*/
public class MapBinder extends CollectionBinder {
+ public MapBinder(boolean sorted) {
+ super(sorted);
+ }
+ public MapBinder() {
+ super();
+ }
+
protected Collection createCollection(PersistentClass persistentClass) {
return new org.hibernate.mapping.Map( persistentClass );
}
17 years, 9 months