From d3a4f9527b762cf0f87c16760285854005c740fa Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Thu, 22 Aug 2024 12:14:41 +0200 Subject: [PATCH] [jOOQ/jOOQ#17092] Fix this also for Derby --- jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java b/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java index bfebfe837d..b8d2f84c1f 100644 --- a/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java @@ -1144,8 +1144,8 @@ implements Condition and = null; for (Field field : fields) { - Field f = (Field) field; - Condition other = matchByConflictingKey(ctx, f, (Field) map.get(f)); + Field f = (Field) orElse(table().field(field), () -> field); + Condition other = matchByConflictingKey(f, (Field) map.get(f)); and = (and == null) ? other : and.and(other); } @@ -1177,7 +1177,7 @@ implements for (Field field : fields) { Field f = (Field) orElse(table().field(field), () -> field); - Condition other = matchByConflictingKey(ctx, f, s.field(f)); + Condition other = matchByConflictingKey(f, s.field(f)); and = (and == null) ? other : and.and(other); } @@ -1187,8 +1187,8 @@ implements return or; } - private final Condition matchByConflictingKey(Context ctx, Field f, Field v) { - return f.eq(v); + private final Condition matchByConflictingKey(Field field, Field v) { + return field.eq(v); } @Override