Author: alessandrolt
Date: 2011-02-15 12:55:17 -0500 (Tue, 15 Feb 2011)
New Revision: 20915
Modified:
core/patches/JBOSS_EAP_3_3_2_CP03_JBPAPP-5939/core/src/main/java/org/hibernate/id/enhanced/SequenceStyleGenerator.java
Log:
JBPAPP-5939: backporting the fix of JBPAPP-5763 to on-off patch
Modified:
core/patches/JBOSS_EAP_3_3_2_CP03_JBPAPP-5939/core/src/main/java/org/hibernate/id/enhanced/SequenceStyleGenerator.java
===================================================================
---
core/patches/JBOSS_EAP_3_3_2_CP03_JBPAPP-5939/core/src/main/java/org/hibernate/id/enhanced/SequenceStyleGenerator.java 2011-02-15
17:54:56 UTC (rev 20914)
+++
core/patches/JBOSS_EAP_3_3_2_CP03_JBPAPP-5939/core/src/main/java/org/hibernate/id/enhanced/SequenceStyleGenerator.java 2011-02-15
17:55:17 UTC (rev 20915)
@@ -24,21 +24,20 @@
*/
package org.hibernate.id.enhanced;
-import java.util.Properties;
import java.io.Serializable;
+import java.util.Properties;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.hibernate.id.PersistentIdentifierGenerator;
-import org.hibernate.id.Configurable;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
+import org.hibernate.dialect.Dialect;
import org.hibernate.engine.SessionImplementor;
+import org.hibernate.id.Configurable;
+import org.hibernate.id.PersistentIdentifierGenerator;
import org.hibernate.mapping.Table;
-import org.hibernate.util.PropertiesHelper;
import org.hibernate.type.Type;
-import org.hibernate.dialect.Dialect;
+import org.hibernate.util.PropertiesHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Generates identifier values based on an sequence-style database structure.
@@ -179,7 +178,7 @@
this.databaseStructure = buildDatabaseStructure( params, dialect, forceTableUse,
sequenceName, initialValue, incrementSize );
- this.optimizer = OptimizerFactory.buildOptimizer( optimizationStrategy,
identifierType.getReturnedClass(), incrementSize );
+ this.optimizer = OptimizerFactory.buildOptimizer( optimizationStrategy,
identifierType.getReturnedClass(), incrementSize, -1 );
this.databaseStructure.prepare( optimizer );
}
@@ -282,7 +281,7 @@
* @param sequenceName The name to use for the sequence or table.
* @param initialValue The initial value.
* @param incrementSize the increment size to use (after any adjustments).
- * @return The db structure representation
+ * @return An abstraction for the actual database structure in use (table vs.
sequence).
*/
protected DatabaseStructure buildDatabaseStructure(
Properties params,
@@ -334,4 +333,4 @@
public String[] sqlDropStrings(Dialect dialect) throws HibernateException {
return databaseStructure.sqlDropStrings( dialect );
}
-}
+}
\ No newline at end of file
Show replies by date