From bea53542831eaa48076d8c64ec978ba526522ae7 Mon Sep 17 00:00:00 2001 From: lukaseder Date: Mon, 17 Apr 2017 18:44:06 +0200 Subject: [PATCH] [#6088] InsertSetStep.select() should return InsertOnDuplicateStep --- jOOQ/src/main/java/org/jooq/InsertSetStep.java | 2 +- jOOQ/src/main/java/org/jooq/impl/ParserImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/InsertSetStep.java b/jOOQ/src/main/java/org/jooq/InsertSetStep.java index ae6a5600b8..f48ae0efcc 100644 --- a/jOOQ/src/main/java/org/jooq/InsertSetStep.java +++ b/jOOQ/src/main/java/org/jooq/InsertSetStep.java @@ -324,5 +324,5 @@ public interface InsertSetStep { * define a field set for insertion. */ @Support - InsertReturningStep select(Select select); + InsertOnDuplicateStep select(Select select); } diff --git a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java index 58271970a3..a4da990417 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java @@ -899,7 +899,7 @@ class ParserImpl implements Parser { SelectQueryImpl select = parseSelect(ctx); returning = onDuplicate = (fields == null) - ? (InsertOnDuplicateStep) ctx.dsl.insertInto(tableName).select(select) + ? ctx.dsl.insertInto(tableName).select(select) : ctx.dsl.insertInto(tableName).columns(fields).select(select); } else if (parseKeywordIf(ctx, "DEFAULT VALUES")) {