can't create DB schema in MSSQL

Description

We use identity generation with GenerationTyp.AUTO to support different DBMS (mssql and postgre) with a sequence generator for each Entity:

persistence.xml

If I start wildfly and it tries to create tables, sequences, etc. mssql, I get the following exception.

Exception on wildfly startup:

Possible workarounds:

  • use create instead of update for hbm2ddl in persistence.xml

    But this isn't practical during development.

Environment

Hibernate Version: 5.0.7.Final
DBMS: MSSQL 2014
Wildfly 10.0.0.Final

Activity

Show:
Luka L
March 30, 2020, 6:11 PM

This issue is still present in Hibernate 5.4.12.Final and MSSQL 2016 / MSSQL 2017 for linux.

I have prepared a github repo with a test case for this issue. The problems are better explained in HHH-10882.

Assignee

Unassigned

Reporter

Johannes Zinn

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure