Spring Data JPA/Hibernate handling associations
问题 I need based on parameter retrieve or not some associations from an entity. In the bellow example I need to get the records list only if a parameter is passed through my api. Can you recommend a way of achieving this using hibernate/spring data? I'm looking for the most clean and spring data-like approach. public class Customer { private UUID id; @OneToMany(mappedBy = "customer")
private List<Record> records = new ArrayList<>(); } public class Record { private UUID id; @Column(name =