Skip to content

Commit 05c5358

Browse files
Update README.md
1 parent 3b12aeb commit 05c5358

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3236,7 +3236,9 @@ This kind of checks or constraints are easy to implement via database triggers.
32363236

32373237
----------------------------------------------------------------------------------------------------------------------
32383238

3239-
229. **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 checkBook(@Validated @ModelAttribute Book book, ...)`. Beside writting an explicit JPQL, we can rely on Spring Data Query Builder mechanism or, even better, on Query By Example (QBE) API. This API is quite useful if the entity has a significant number of attributes and:
3239+
229. **[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)**
3240+
3241+
**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 checkBook(@Validated @ModelAttribute Book book, ...)`. Beside writting an explicit JPQL, we can rely on Spring Data Query Builder mechanism or, even better, on Query By Example (QBE) API. This API is quite useful if the entity has a significant number of attributes and:
32403242

32413243
- for all attributes, we need a head-to-head comparison of each attribute value to the corresponding column value
32423244
- for a subset of attributes, we need a head-to-head comparison of each attribute value to the corresponding column value

0 commit comments

Comments
 (0)