Fix SQLServer test failure
This commit is contained in:
parent
3126e79784
commit
793c8096ac
|
@ -16,7 +16,7 @@ import org.hibernate.dialect.pagination.SQLServer2005LimitHandler;
|
||||||
import org.hibernate.dialect.pagination.SQLServer2012LimitHandler;
|
import org.hibernate.dialect.pagination.SQLServer2012LimitHandler;
|
||||||
import org.hibernate.dialect.pagination.TopLimitHandler;
|
import org.hibernate.dialect.pagination.TopLimitHandler;
|
||||||
import org.hibernate.dialect.sequence.NoSequenceSupport;
|
import org.hibernate.dialect.sequence.NoSequenceSupport;
|
||||||
import org.hibernate.dialect.sequence.SQLServer13SequenceSupport;
|
import org.hibernate.dialect.sequence.SQLServer16SequenceSupport;
|
||||||
import org.hibernate.dialect.sequence.SQLServerSequenceSupport;
|
import org.hibernate.dialect.sequence.SQLServerSequenceSupport;
|
||||||
import org.hibernate.dialect.sequence.SequenceSupport;
|
import org.hibernate.dialect.sequence.SequenceSupport;
|
||||||
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;
|
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;
|
||||||
|
@ -288,7 +288,7 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsIfExistsBeforeTableName() {
|
public boolean supportsIfExistsBeforeTableName() {
|
||||||
if ( getVersion() >= 13 ) {
|
if ( getVersion() >= 16 ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.supportsIfExistsBeforeTableName();
|
return super.supportsIfExistsBeforeTableName();
|
||||||
|
@ -296,7 +296,7 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsIfExistsBeforeConstraintName() {
|
public boolean supportsIfExistsBeforeConstraintName() {
|
||||||
if ( getVersion() >= 13 ) {
|
if ( getVersion() >= 16 ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.supportsIfExistsBeforeConstraintName();
|
return super.supportsIfExistsBeforeConstraintName();
|
||||||
|
@ -445,8 +445,8 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
|
||||||
if ( getVersion() < 11 ) {
|
if ( getVersion() < 11 ) {
|
||||||
return NoSequenceSupport.INSTANCE;
|
return NoSequenceSupport.INSTANCE;
|
||||||
}
|
}
|
||||||
else if ( getVersion() >= 13 ) {
|
else if ( getVersion() >= 16 ) {
|
||||||
return SQLServer13SequenceSupport.INSTANCE;
|
return SQLServer16SequenceSupport.INSTANCE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return SQLServerSequenceSupport.INSTANCE;
|
return SQLServerSequenceSupport.INSTANCE;
|
||||||
|
@ -753,7 +753,7 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDropSequenceString(String sequenceName) throws MappingException {
|
protected String getDropSequenceString(String sequenceName) throws MappingException {
|
||||||
if ( getVersion() >= 13 ) {
|
if ( getVersion() >= 16 ) {
|
||||||
return "drop sequence if exists " + sequenceName;
|
return "drop sequence if exists " + sequenceName;
|
||||||
}
|
}
|
||||||
return super.getDropSequenceString( sequenceName );
|
return super.getDropSequenceString( sequenceName );
|
||||||
|
@ -761,7 +761,7 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getDropSchemaCommand(String schemaName) {
|
public String[] getDropSchemaCommand(String schemaName) {
|
||||||
if ( getVersion() >= 13 ) {
|
if ( getVersion() >= 16 ) {
|
||||||
return new String[] { "drop schema if exists " + schemaName };
|
return new String[] { "drop schema if exists " + schemaName };
|
||||||
}
|
}
|
||||||
return super.getDropSchemaCommand( schemaName );
|
return super.getDropSchemaCommand( schemaName );
|
||||||
|
|
|
@ -8,8 +8,8 @@ package org.hibernate.dialect.sequence;
|
||||||
|
|
||||||
import org.hibernate.MappingException;
|
import org.hibernate.MappingException;
|
||||||
|
|
||||||
public class SQLServer13SequenceSupport extends SQLServerSequenceSupport{
|
public class SQLServer16SequenceSupport extends SQLServerSequenceSupport{
|
||||||
public static final SequenceSupport INSTANCE = new SQLServer13SequenceSupport();
|
public static final SequenceSupport INSTANCE = new SQLServer16SequenceSupport();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDropSequenceString(String sequenceName) throws MappingException {
|
public String getDropSequenceString(String sequenceName) throws MappingException {
|
Loading…
Reference in New Issue