From c171288cb0b82313bf6191bdcb2af1b6f6d656e7 Mon Sep 17 00:00:00 2001 From: lukaseder Date: Tue, 19 Sep 2017 11:22:10 +0200 Subject: [PATCH] [#6584] Improve DSLContext.batchStore() Javadoc, indicating that it does not execute MERGE / UPSERT semantics --- jOOQ/src/main/java/org/jooq/DSLContext.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java index 45a2813180..73dbfbc9de 100644 --- a/jOOQ/src/main/java/org/jooq/DSLContext.java +++ b/jOOQ/src/main/java/org/jooq/DSLContext.java @@ -8131,6 +8131,15 @@ public interface DSLContext extends Scope , AutoCloseable { * This mode may be better for large and complex batch store operations, as * the order of records is preserved entirely, and jOOQ can guarantee that * only a single batch statement is serialised to the database. + *

+ *

A note on MERGE / UPSERT semantics
+ *

+ * This method (just like {@link UpdatableRecord#store()}) does not + * implement the semantics of an actual UPSERT or + * MERGE statement, which delegates the decision of whether to + * INSERT or UPDATE a record to the database. The + * decision is made by the client (jOOQ) depending on whether each + * individual record has been fetched from the database prior to storing it. * * @see UpdatableRecord#store() * @see Statement#executeBatch()