Skip to content

Latest commit

 

History

History
 
 

HibernateSpringBootCloneEntity

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

The Best Way To Clone Entities

Description: This application is an example of cloning entities. The best way to achieve this goal relies on copy-constructors. This way we can control what we copy. Here we use a bidirectional-lazy @ManyToMany association between Author and Book.

Key points:

  • clone an Author (only the genre) and associate the corresponding books
  • clone an Author (only the genre) and clone the books as well

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.