Skip to content

Commit f852d7d

Browse files
authored
Update Repositories.adoc
Renaming AuthorBookRecord to AuthorBookSummary
1 parent 3533b77 commit f852d7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/src/main/asciidoc/repositories/Repositories.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ The JPQL specification provides the `select new` construct for this.
495495

496496
[source,java]
497497
----
498-
@Query("select new AuthorBookRecord(b.isbn, a.ssn, a.name, b.title " +
498+
@Query("select new AuthorBookSummary(b.isbn, a.ssn, a.name, b.title " +
499499
"from Author a join books b " +
500500
"where title like :pattern")
501501
List<AuthorBookSummary> summariesForTitle(@Pattern String pattern);
@@ -563,4 +563,4 @@ List<Book> books(@By("isbn") String[] ibsns);
563563

564564
Naturally, the name and type of the parameter are still checked at compile time; there's no loss of typesafety here, despite the string.
565565

566-
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.
566+
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.

0 commit comments

Comments
 (0)