Skip to content

Commit 0d4324d

Browse files
committed
2 parents 90e3151 + a63b583 commit 0d4324d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

HibernateSpringBootExampleApi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**[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

3-
**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:
3+
**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 is quite useful if the entity has a significant number of attributes and:
44

55
- we need a head-to-head comparison of each attribute value to the corresponding column value
66
- we consider that a `Book` exists if at least one attribute value matches a column value

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3238,7 +3238,7 @@ This kind of checks or constraints are easy to implement via database triggers.
32383238

32393239
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)**
32403240

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 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:
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 is quite useful if the entity has a significant number of attributes and:
32423242

32433243
- we need a head-to-head comparison of each attribute value to the corresponding column value
32443244
- we consider that a `Book` exists if at least one attribute value matches a column value

0 commit comments

Comments
 (0)