From f852d7d349627f73a737c25999360ba41f048b6d Mon Sep 17 00:00:00 2001 From: Gabriel da Cunha Date: Sat, 25 Jan 2025 13:23:46 -0300 Subject: [PATCH 1/2] Update Repositories.adoc Renaming AuthorBookRecord to AuthorBookSummary --- .../src/main/asciidoc/repositories/Repositories.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/src/main/asciidoc/repositories/Repositories.adoc b/documentation/src/main/asciidoc/repositories/Repositories.adoc index 50c703e1d0db..32b7634d66f1 100644 --- a/documentation/src/main/asciidoc/repositories/Repositories.adoc +++ b/documentation/src/main/asciidoc/repositories/Repositories.adoc @@ -495,7 +495,7 @@ The JPQL specification provides the `select new` construct for this. [source,java] ---- -@Query("select new AuthorBookRecord(b.isbn, a.ssn, a.name, b.title " + +@Query("select new AuthorBookSummary(b.isbn, a.ssn, a.name, b.title " + "from Author a join books b " + "where title like :pattern") List summariesForTitle(@Pattern String pattern); @@ -563,4 +563,4 @@ List books(@By("isbn") String[] ibsns); Naturally, the name and type of the parameter are still checked at compile time; there's no loss of typesafety here, despite the string. -The `@Param` annotation is significantly less useful, since we can always rename our HQL query parameter to match the method parameter, or, at worst, use an ordinal parameter instead. \ No newline at end of file +The `@Param` annotation is significantly less useful, since we can always rename our HQL query parameter to match the method parameter, or, at worst, use an ordinal parameter instead. From 62f465e99bf5bd466cd0c1099a55bdc8a10be51a Mon Sep 17 00:00:00 2001 From: Gabriel da Cunha Date: Mon, 27 Jan 2025 11:06:47 -0300 Subject: [PATCH 2/2] Update Repositories.adoc