Skip to content

Commit 0c9f158

Browse files
committed
Query By Example (QBE)
1 parent 7925d24 commit 0c9f158

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

HibernateSpringBootExampleApi/src/main/java/com/bookstore/service/BookstoreService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public boolean existsBook1(Book book) {
2424
public boolean existsBook2(Book book) {
2525

2626
Example<Book> bookExample = Example.of(book,
27-
ExampleMatcher.matchingAll().withIgnorePaths("genre").withIgnorePaths("price"));
27+
ExampleMatcher.matchingAll().withIgnorePaths("genre", "price"));
2828
return bookRepository.exists(bookExample);
2929
}
3030

3131
public boolean existsBook3(Book book) {
3232

3333
Example<Book> bookExample = Example.of(book,
34-
ExampleMatcher.matchingAny().withIgnorePaths("genre").withIgnorePaths("price"));
34+
ExampleMatcher.matchingAny().withIgnorePaths("genre", "price"));
3535
return bookRepository.exists(bookExample);
3636
}
3737
}

0 commit comments

Comments
 (0)