What is the use of the Hibernate @LazyCollection annotation

前端 未结 3 973
灰色年华
灰色年华 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:05

    EXTRA = .size() and .contains() won't initialize the whole collection

    TRUE = initialize the whole collection on first access

    FALSE = Eager-Loading

提交回复
热议问题