Skip to content

Commit f16ac83

Browse files
committed
remove unnecessary @pattern annotation in doc code examples
typical copy/paste error
1 parent f6da195 commit f16ac83

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
@@ -498,7 +498,7 @@ The JPQL specification provides the `select new` construct for this.
498498
@Query("select new AuthorBookSummary(b.isbn, a.ssn, a.name, b.title " +
499499
"from Author a join books b " +
500500
"where title like :pattern")
501-
List<AuthorBookSummary> summariesForTitle(@Pattern String pattern);
501+
List<AuthorBookSummary> summariesForTitle(String pattern);
502502
----
503503

504504
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`,
511511
@Query("select isbn, ssn, name, title " +
512512
"from Author join books " +
513513
"where title like :pattern")
514-
List<AuthorBookSummary> summariesForTitle(@Pattern String pattern);
514+
List<AuthorBookSummary> summariesForTitle(String pattern);
515515
----
516516
====
517517

0 commit comments

Comments
 (0)