From dceb92d4a5a5dc0943f249c2d61097905f7318c9 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Wed, 12 May 2010 20:45:00 +0000 Subject: [PATCH] HHH-5042 - TableGenerator does not increment hibernate_sequences.next_hi_value anymore after having exhausted the current lo-range git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19488 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../java/org/hibernate/id/MultipleHiLoPerTableGenerator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java b/core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java index 27280f91d8..9477819b7e 100644 --- a/core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java +++ b/core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java @@ -279,6 +279,8 @@ public class MultipleHiLoPerTableGenerator maxLo = PropertiesHelper.getInt(MAX_LO, params, Short.MAX_VALUE); returnClass = type.getReturnedClass(); - hiloOptimizer = new OptimizerFactory.LegacyHiLoAlgorithmOptimizer( returnClass, maxLo ); + if ( maxLo >= 1 ) { + hiloOptimizer = new OptimizerFactory.LegacyHiLoAlgorithmOptimizer( returnClass, maxLo ); + } } }