|
on MSSQL2012 creates a sequence of type bigint, starting by default from the number -9,223,372,036,854,775,808. It would make much more sense to start with 1, as other dialects do.
Furthermore, this number is exactly equal to java's Long.MIN_VALUE, so it confuses the IdentifierGeneratorHelper$BasicHolder which then thinks it hasn't been initialized and throws IdentifierGenerationException from the makeValue() method. This means the default hibernate_sequence becomes unusable
To reproduce, run org.hibernate.test.id.SequenceGeneratorTest against a SQL Server 2012 database. It will fail with
|