From f55f1c7a4324235262d07be20f55ce9c138339f7 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sat, 27 Apr 2024 00:35:10 +0200 Subject: [PATCH] document implicit joins in 'delete'/'update' queries Signed-off-by: Gavin King --- .../src/main/asciidoc/querylanguage/Concepts.adoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/documentation/src/main/asciidoc/querylanguage/Concepts.adoc b/documentation/src/main/asciidoc/querylanguage/Concepts.adoc index f44413c409..c8b1a318c2 100644 --- a/documentation/src/main/asciidoc/querylanguage/Concepts.adoc +++ b/documentation/src/main/asciidoc/querylanguage/Concepts.adoc @@ -314,7 +314,10 @@ Adding the keyword `versioned`—writing `update versioned`—specifies that Hib update versioned Book set title = :newTitle where ssn = :ssn ---- -Unfortunately, an `update` statement may not directly join other entities, not even using an <>, but it may have subqueries in its `set` clause, or in the `where` clause, which may contain joins. +An `update` statement may not directly `join` other entities, but it may: + +- have an <>, or +- have subqueries in its `set` clause, or in its `where` clause, and the subqueries may contain joins. [[delete]] ==== Delete statements @@ -343,7 +346,10 @@ A `delete` statement is executed by calling `Query.executeUpdate()`. The integer value returned by `executeUpdate()` indicates the number of entity instances affected by the operation. -A `delete` statement may not directly join other entities, but it may have subqueries in the `where` clause, which may contain joins. +A `delete` statement may not directly `join` other entities, but it may: + +- have an <>, or +- have subqueries in its `where` clause, and the subqueries may contain joins. [[insert]] ==== Insert statements