[jOOQ/jOOQ#10989] Cannot use MERGE with SELECT: [42XAL]: The source

table of a MERGE statement must be a base table or table function.
This commit is contained in:
Lukas Eder 2020-11-20 13:50:26 +01:00
parent c4d3644872
commit aa33496cde

View File

@ -586,13 +586,23 @@ final class InsertQueryImpl<R extends Record> extends AbstractStoreQuery<R> impl
case DERBY:
case H2:
case HSQLDB: {
ctx.visit(toMerge(ctx.configuration()));
break;
}
case DERBY: {
// [#10989] Cannot use MERGE with SELECT: [42XAL]: The source table of a MERGE statement must be a base table or table function.
if (select != null)
ctx.visit(toInsertSelect(ctx.configuration()));
else
ctx.visit(toMerge(ctx.configuration()));
break;
}
default: {
ctx.visit(toInsertSelect(ctx.configuration()));
break;