HHH-17221 AssertionError initializing a collection with FetchMode.SUBSELECT and IdClass having only one field
This commit is contained in:
parent
77a53bca9b
commit
2a00a49123
|
@ -1148,8 +1148,7 @@ public class LoaderSelectBuilder {
|
||||||
|
|
||||||
final Expression fkExpression;
|
final Expression fkExpression;
|
||||||
|
|
||||||
final int jdbcTypeCount = fkDescriptor.getJdbcTypeCount();
|
if ( !fkDescriptor.isEmbedded() ) {
|
||||||
if ( jdbcTypeCount == 1 ) {
|
|
||||||
assert fkDescriptor instanceof SimpleForeignKeyDescriptor;
|
assert fkDescriptor instanceof SimpleForeignKeyDescriptor;
|
||||||
final SimpleForeignKeyDescriptor simpleFkDescriptor = (SimpleForeignKeyDescriptor) fkDescriptor;
|
final SimpleForeignKeyDescriptor simpleFkDescriptor = (SimpleForeignKeyDescriptor) fkDescriptor;
|
||||||
final TableReference tableReference = rootTableGroup.resolveTableReference(
|
final TableReference tableReference = rootTableGroup.resolveTableReference(
|
||||||
|
@ -1163,7 +1162,7 @@ public class LoaderSelectBuilder {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final List<ColumnReference> columnReferences = new ArrayList<>( jdbcTypeCount );
|
final List<ColumnReference> columnReferences = new ArrayList<>( fkDescriptor.getJdbcTypeCount() );
|
||||||
fkDescriptor.forEachSelectable(
|
fkDescriptor.forEachSelectable(
|
||||||
(columnIndex, selection) -> {
|
(columnIndex, selection) -> {
|
||||||
final TableReference tableReference = rootTableGroup.resolveTableReference(
|
final TableReference tableReference = rootTableGroup.resolveTableReference(
|
||||||
|
|
Loading…
Reference in New Issue