Skip to content

Files

Latest commit

 

History

History

HibernateSpringBootRecordAndEmbeddables

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Using Java records as Hibernate embeddable

Description: This application is an example of using Java records as embeddable. This is available starting with Hibernate 6.0, but it was refined to be more accessible and easy to use in Hibernate 6.2

Key points:

  • add Hibernate 6.2 (this is not default in Spring Boot 3.0.2 used here)
  • define a record (Contact)
  • add this record in an entity (Author) via @Embedded
  • fetch data into a DTO represented by another record (AuthorDto)

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.