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 );
|
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
|
@Override
|
||||||
public String getSequenceNextValString(String sequenceName) {
|
public String getSequenceNextValString(String sequenceName) {
|
||||||
if ( supportsSequences() ) {
|
if ( supportsSequences() ) {
|
||||||
|
@ -235,7 +245,7 @@ public class DerbyDialect extends DB2Dialect {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasWithClause(String normalizedSelect){
|
private boolean hasWithClause(String normalizedSelect){
|
||||||
return normalizedSelect.startsWith( "with ", normalizedSelect.length()-7 );
|
return normalizedSelect.startsWith( "with ", normalizedSelect.length() - 7 );
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getWithIndex(String querySelect) {
|
private int getWithIndex(String querySelect) {
|
||||||
|
@ -246,11 +256,6 @@ public class DerbyDialect extends DB2Dialect {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getQuerySequencesString() {
|
|
||||||
return null ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue