HHH-10110 - Fix DerbyDialect#getQuerySequencesString() causing error during schema update
This commit is contained in:
parent
86bbb1de8f
commit
fc6312a73b
|
@ -123,6 +123,16 @@ public class DerbyDialect extends DB2Dialect {
|
|||
return driverVersionMajor > 10 || ( driverVersionMajor == 10 && driverVersionMinor >= 6 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQuerySequencesString() {
|
||||
if ( supportsSequences() ) {
|
||||
return "select SEQUENCENAME from SYS.SYSSEQUENCES";
|
||||
}
|
||||
else {
|
||||
throw new MappingException( "Derby does not support sequence prior to release 10.6.1.0" );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSequenceNextValString(String sequenceName) {
|
||||
if ( supportsSequences() ) {
|
||||
|
@ -235,7 +245,7 @@ public class DerbyDialect extends DB2Dialect {
|
|||
}
|
||||
|
||||
private boolean hasWithClause(String normalizedSelect){
|
||||
return normalizedSelect.startsWith( "with ", normalizedSelect.length()-7 );
|
||||
return normalizedSelect.startsWith( "with ", normalizedSelect.length() - 7 );
|
||||
}
|
||||
|
||||
private int getWithIndex(String querySelect) {
|
||||
|
@ -246,11 +256,6 @@ public class DerbyDialect extends DB2Dialect {
|
|||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQuerySequencesString() {
|
||||
return null ;
|
||||
}
|
||||
|
||||
|
||||
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Reference in New Issue