[jOOQ/jOOQ#11521] ClassCastException when ResultQuery.fetchArray() returns no rows
This commit is contained in:
parent
cddd67ff95
commit
70e5a9555a
@ -170,6 +170,7 @@ import static org.jooq.impl.Tools.fieldArray;
|
||||
import static org.jooq.impl.Tools.hasAmbiguousNames;
|
||||
import static org.jooq.impl.Tools.isNotEmpty;
|
||||
import static org.jooq.impl.Tools.qualify;
|
||||
import static org.jooq.impl.Tools.recordType;
|
||||
import static org.jooq.impl.Tools.selectQueryImpl;
|
||||
import static org.jooq.impl.Tools.unalias;
|
||||
import static org.jooq.impl.Tools.unqualified;
|
||||
@ -3505,9 +3506,9 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|
||||
if (getFrom().size() == 1 && getSelectAsSpecified().isEmpty())
|
||||
return (Class<? extends R>) getFrom().get(0).asTable().getRecordType();
|
||||
|
||||
// TODO: [#4695] Calculate the correct Record[B] type
|
||||
// [#4695] [#11521] Calculate the correct Record[B] type
|
||||
else
|
||||
return (Class<? extends R>) RecordImplN.class;
|
||||
return (Class<? extends R>) recordType(getSelect().size());
|
||||
}
|
||||
|
||||
final TableList getFrom() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user