Skip to content

Commit a06b5f6

Browse files
Update README.md
1 parent 3adb422 commit a06b5f6

File tree

1 file changed

+11
-0
lines changed
  • HibernateSpringBootDtoBlazeEntityView

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
**[DTOs via Blaze-Persistence Entity Views](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoBlazeEntityView)**
12

3+
**Description:** Fetching more data than needed is prone to performance penalities. Using DTOs allows us to extract only the needed data. In this application we rely on [Blaze-Persistence](https://persistence.blazebit.com/) entity views.
4+
5+
**Key points:**\
6+
- add in pom.xml dependencies specific to Blaze-Persistence\
7+
- configure Blaze-Persistence, `CriteriaBuilderFactory` and `EntityViewManager`\
8+
- write an entity view via an interface in Blaze-Persistence fashion\
9+
- write a Spring-centric repository by extending `EntityViewRepository`\
10+
- call method of this repository such as, `findAll()`, `findOne()`, etc\
11+
- starting with Hibernate 5.2, `ResultTransformer` is deprecated, but until a replacement will be available (in Hibernate 6.0) it can be used ([read further](https://discourse.hibernate.org/t/hibernate-resulttransformer-is-deprecated-what-to-use-instead/232))\
12+
- for using Spring Data Projections check this [recipe](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoViaProjections)

0 commit comments

Comments
 (0)