What is the use of the Hibernate @LazyCollection annotation

前端 未结 3 965
灰色年华
灰色年华 2021-02-01 02:57

I have 2 entities as Parent and Child as OneToMany relation as

@Entity
public class Parent {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer         


        
3条回答
  •  孤独总比滥情好
    2021-02-01 03:01

    To give you a hint, it's mainly for performance reasons, you can start reading the following links:

    Second Level Cache

    Hibernate Documentation

提交回复
热议问题