Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 2.04 KB

File metadata and controls

23 lines (17 loc) · 2.04 KB

How To Use Spring Projections(DTO) And Exclusive Right Joins

Description: This application is a proof of concept for using Spring Projections(DTO) and exclusive right joins written via JPQL and native SQL (for MySQL).

Key points:

  • define two entities (e.g., Author and Book in a (lazy) bidirectional @OneToMany association)
  • populate the database with some test data (e.g., check the file resources/data-mysql.sql)
  • write interfaces (Spring projections) that contains getters for the columns that should be fetched from the database (e.g., check AuthorNameBookTitle.java)
  • write exclusive right joins queries using JPQL/SQL

If you need a deep dive into the performance recipes exposed in this repository then I am sure that you will love my book "Spring Boot Persistence Best Practices"If you need a hand of tips and illustrations of 100+ Java persistence performance issues then "Java Persistence Performance Illustrated Guide" is for you.