mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 16:44:57 +00:00
HHH-10110 - Fix DerbyDialect#getQuerySequencesString() causing error during schema update
This commit is contained in:
parent
f7d9640848
commit
4428e1a4c4
@ -123,6 +123,16 @@ public boolean supportsSequences() {
|
||||
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 @@ private boolean hasForUpdateClause(int forUpdateIndex) {
|
||||
}
|
||||
|
||||
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 @@ private int getWithIndex(String querySelect) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQuerySequencesString() {
|
||||
return null ;
|
||||
}
|
||||
|
||||
|
||||
// Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user