File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
documentation/src/main/asciidoc
userguide/chapters/query/hql Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -601,7 +601,7 @@ for (var result : results) {
601
601
602
602
This is bearable, but let's explore some other options.
603
603
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`.
605
605
All we have to do is pass the class `Tuple` to `createQuery()`.
606
606
607
607
[source, java]
@@ -630,8 +630,8 @@ var results =
630
630
Map.class)
631
631
.getResultList();
632
632
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");
635
635
}
636
636
----
637
637
[source, java]
@@ -643,7 +643,7 @@ var results =
643
643
.getResultList();
644
644
for (var list : results) {
645
645
String title = (String) list.get(0);
646
- String preamble = (String) tuple .get(1);
646
+ String preamble = (String) list .get(1);
647
647
}
648
648
----
649
649
Original file line number Diff line number Diff line change @@ -1939,7 +1939,7 @@ There's no need to bother with trying to represent a "tuple of length 1".
1939
1939
But if there are multiple expressions in the select list then:
1940
1940
1941
1941
- 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`.
1943
1943
1944
1944
[[hql-select-clause-projection-example]]
1945
1945
//.Query results as lists
You can’t perform that action at this time.
0 commit comments