From bcbb16ef60cf045bb0d5e5188a501b8563d7c31d Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 17 Oct 2024 15:36:13 +0200 Subject: [PATCH] Polishing. Mention restrictions. See #3636 Original pull request: #3637 --- .../antora/modules/ROOT/pages/jpa/query-methods.adoc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc index 0903bebd60..d71088c274 100644 --- a/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc +++ b/src/main/antora/modules/ROOT/pages/jpa/query-methods.adoc @@ -325,10 +325,10 @@ The resulting map contains key/value pairs representing the actual database colu ==== [source, java] ---- -public interface UserRepository extends JpaRepository { +interface UserRepository extends JpaRepository { @NativeQuery("SELECT * FROM USERS WHERE EMAIL_ADDRESS = ?1") - Map findRawMapByEmail(String emailAddress); <1> + Map findRawMapByEmail(String emailAddress); <1> @NativeQuery("SELECT * FROM USERS WHERE LASTNAME = ?1") List> findRawMapByLastname(String lastname); <2> @@ -338,6 +338,11 @@ public interface UserRepository extends JpaRepository { <2> Multiple `Map` results backed by ``Tuple``s. ==== +NOTE: String-based Tuple Queries are only supported by Hibernate. +Eclipselink supports only Criteria-based Tuple Queries. + +[[jpa.query-methods.at-query.projections]] + [[jpa.query-methods.sorting]] == Using Sort