Skip to content

Commit 280df7c

Browse files
committed
fix javax package name + minor code example errors
(spotted by @andrei-ivanov)
1 parent 1557a66 commit 280df7c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

documentation/src/main/asciidoc/querylanguage/Concepts.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ for (var result : results) {
601601

602602
This is bearable, but let's explore some other options.
603603

604-
JPA lets us specify that we want each query result packaged as an instance of `javax.persistence.Tuple`.
604+
JPA lets us specify that we want each query result packaged as an instance of `jakarta.persistence.Tuple`.
605605
All we have to do is pass the class `Tuple` to `createQuery()`.
606606

607607
[source, java]
@@ -630,8 +630,8 @@ var results =
630630
Map.class)
631631
.getResultList();
632632
for (var map : results) {
633-
String title = (String) tuple.get("title");
634-
String preamble = (String) tuple.get("preamble");
633+
String title = (String) map.get("title");
634+
String preamble = (String) map.get("preamble");
635635
}
636636
----
637637
[source, java]
@@ -643,7 +643,7 @@ var results =
643643
.getResultList();
644644
for (var list : results) {
645645
String title = (String) list.get(0);
646-
String preamble = (String) tuple.get(1);
646+
String preamble = (String) list.get(1);
647647
}
648648
----
649649

documentation/src/main/asciidoc/userguide/chapters/query/hql/QueryLanguage.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ There's no need to bother with trying to represent a "tuple of length 1".
19391939
But if there are multiple expressions in the select list then:
19401940
19411941
- by default, each query result is packaged as an array of type `Object[]`, or
1942-
- if explicitly requested by passing the class `Tuple` to `createQuery()`, the query result is packaged as an instance of `javax.persistence.Tuple`.
1942+
- if explicitly requested by passing the class `Tuple` to `createQuery()`, the query result is packaged as an instance of `jakarta.persistence.Tuple`.
19431943
19441944
[[hql-select-clause-projection-example]]
19451945
//.Query results as lists

0 commit comments

Comments
 (0)