Fix default null ordering for H2 and re-enable test

This commit is contained in:
Christian Beikov 2021-12-23 00:31:53 +01:00
parent ef6f190925
commit 90e551da4b
3 changed files with 5 additions and 16 deletions

View File

@ -389,7 +389,7 @@ public class H2Dialect extends Dialect {
@Override
public NullOrdering getNullOrdering() {
return NullOrdering.FIRST;
return NullOrdering.SMALLEST;
}
@Override

View File

@ -76,14 +76,14 @@ public class CorrelatedTableGroup extends AbstractTableGroup {
String tableExpression,
boolean allowFkOptimization,
boolean resolve) {
final TableReference primaryTableReference = correlatedTableGroup.getPrimaryTableReference().getTableReference(
final TableReference tableReference = correlatedTableGroup.getTableReference(
navigablePath,
tableExpression,
allowFkOptimization,
resolve
);
if ( primaryTableReference != null ) {
return primaryTableReference;
if ( tableReference != null ) {
return tableReference;
}
for ( TableGroupJoin tableGroupJoin : getNestedTableGroupJoins() ) {
final TableReference groupTableReference = tableGroupJoin.getJoinedGroup()
@ -101,17 +101,6 @@ public class CorrelatedTableGroup extends AbstractTableGroup {
return groupTableReference;
}
}
for ( TableReferenceJoin tableReferenceJoin : correlatedTableGroup.getTableReferenceJoins() ) {
final TableReference tableReference = tableReferenceJoin.getJoinedTableReference().getTableReference(
navigablePath,
tableExpression,
allowFkOptimization,
resolve
);
if ( tableReference != null ) {
return tableReference;
}
}
return null;
}

View File

@ -1,4 +1,4 @@
package org.hibernate.query.criteria.internal;
package org.hibernate.orm.test.query.criteria.internal;
import java.util.List;