Skip to content

Commit 1bb33a7

Browse files
Query By Example (QBE)
1 parent 6ce28d2 commit 1bb33a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HibernateSpringBootExampleApi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**[How To Check If A Transient Entity Exists Via Spring Query By Example (QBE)](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootExampleApi)**
1+
**[How To Check If A Transient Entity Exists In The Database Via Spring Query By Example (QBE)](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootExampleApi)**
22

33
**Description:** This application is an example of using Spring Data Query By Example (QBE) to check if a transient entity exists in the database. Consider the `Book` entity and a Spring controller that exposes an endpoint as: `public String saveNewBook(@Validated @ModelAttribute Book book, ...)`. Before saving a new book, we must ensure that this book doesn't already exists in the database. Beside writting an explicit JPQL, we can rely on Spring Data Query Builder mechanism or, even better, on Query By Example (QBE) API. This is quite useful if the entity has a significant number of attributes and:
44

0 commit comments

Comments
 (0)