diff --git a/documentation/src/main/asciidoc/querylanguage/Concepts.adoc b/documentation/src/main/asciidoc/querylanguage/Concepts.adoc index 703d2fbaec..f69073d309 100644 --- a/documentation/src/main/asciidoc/querylanguage/Concepts.adoc +++ b/documentation/src/main/asciidoc/querylanguage/Concepts.adoc @@ -601,7 +601,7 @@ for (var result : results) { This is bearable, but let's explore some other options. -JPA lets us specify that we want each query result packaged as an instance of `javax.persistence.Tuple`. +JPA lets us specify that we want each query result packaged as an instance of `jakarta.persistence.Tuple`. All we have to do is pass the class `Tuple` to `createQuery()`. [source, java] @@ -630,8 +630,8 @@ var results = Map.class) .getResultList(); for (var map : results) { - String title = (String) tuple.get("title"); - String preamble = (String) tuple.get("preamble"); + String title = (String) map.get("title"); + String preamble = (String) map.get("preamble"); } ---- [source, java] @@ -643,7 +643,7 @@ var results = .getResultList(); for (var list : results) { String title = (String) list.get(0); - String preamble = (String) tuple.get(1); + String preamble = (String) list.get(1); } ---- diff --git a/documentation/src/main/asciidoc/userguide/chapters/query/hql/QueryLanguage.adoc b/documentation/src/main/asciidoc/userguide/chapters/query/hql/QueryLanguage.adoc index 4b1b7e777f..26ddddb338 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/query/hql/QueryLanguage.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/query/hql/QueryLanguage.adoc @@ -1938,7 +1938,7 @@ There's no need to bother with trying to represent a "tuple of length 1". But if there are multiple expressions in the select list then: - by default, each query result is packaged as an array of type `Object[]`, or -- if explicitly requested by passing the class `Tuple` to `createQuery()`, the query result is packaged as an instance of `javax.persistence.Tuple`. +- if explicitly requested by passing the class `Tuple` to `createQuery()`, the query result is packaged as an instance of `jakarta.persistence.Tuple`. [[hql-select-clause-projection-example]] //.Query results as lists