mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-08 20:24:46 +00:00
Fix newly added tests for derby
This commit is contained in:
parent
1983123d72
commit
b3ab4c2299
@ -27,4 +27,10 @@ public DerbyTenSixDialect() {
|
|||||||
public boolean supportsSequences() {
|
public boolean supportsSequences() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCrossJoinSeparator() {
|
||||||
|
// 10.6 introduced support for the cross join syntax: http://db.apache.org/derby/docs/10.6/ref/rrefsqljcrossjoin.html
|
||||||
|
return " cross join ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -557,6 +557,7 @@ public void setTeacher(Teacher teacher) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int countNumberOfJoins(String query) {
|
private static int countNumberOfJoins(String query) {
|
||||||
return query.toLowerCase( Locale.ROOT ).split( " join ", -1 ).length - 1;
|
String fromPart = query.toLowerCase( Locale.ROOT ).split( " from " )[1].split( " where " )[0];
|
||||||
|
return fromPart.split( "(\\sjoin\\s|,\\s)", -1 ).length - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -554,6 +554,7 @@ public void setTeacher(Teacher teacher) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int countNumberOfJoins(String query) {
|
private static int countNumberOfJoins(String query) {
|
||||||
return query.toLowerCase( Locale.ROOT ).split( " join ", -1 ).length - 1;
|
String fromPart = query.toLowerCase( Locale.ROOT ).split( " from " )[1].split( " where " )[0];
|
||||||
|
return fromPart.split( "(\\sjoin\\s|,\\s)", -1 ).length - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user