BigIntegerSequenceGeneratorTest.testBasics fails on MS SQL Server 2012
MS SQL Server 2012
The fix for was not correct and has been reverted by HHH-10053.
will cover the actual fix for the underlying issue.
Fixed in master, 4.3, and 4.2 branches.
I've left BigIntegerSequenceGeneratorTest using a mapping with the default scale (2), but explicitly excluded SQLServer2012Dialect.
I added a mapping with scale="0" and created a new test, BigIntegerSequenceGeneratorZeroScaleTest, that uses the new mapping.
The fix for this issue will only involve setting scale="0" in the test as a workaround.
will cover the actual fix that will set scale="0" by default for big_integer properties.
The reason why this is happening is because for SQL Server, a bigint sequence ranges from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
By default, the first sequence value returned by SQL Server is -9,223,372,036,854,775,808.
I think that for a property of type java.sql.Types.BIGINT, the scale for the column should be 0 by default (not 2). There should be no need to add scale="0".
FWIW, I confirmed that this also works: