From 4f5709c6b27ed14a2526e1afc933daf48212c3c9 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sun, 30 Mar 2025 19:15:49 +0200 Subject: [PATCH] remove unnecessary @Pattern annotation in doc code examples typical copy/paste error --- .../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 b1b90acfd783..cfc802f7eecd 100644 --- a/documentation/src/main/asciidoc/repositories/Repositories.adoc +++ b/documentation/src/main/asciidoc/repositories/Repositories.adoc @@ -498,7 +498,7 @@ The JPQL specification provides the `select new` construct for this. @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); +List summariesForTitle(String pattern); ---- Note that the `from` clause is required here, since it's impossible to infer the queried entity type from the return type of the repository method. @@ -511,7 +511,7 @@ Since this is quite verbose, Hibernate doesn't require the use of `select new`, @Query("select isbn, ssn, name, title " + "from Author join books " + "where title like :pattern") -List summariesForTitle(@Pattern String pattern); +List summariesForTitle(String pattern); ---- ====