Eager Fetch Type (ARCH8060)
Esta página aún no está disponible en tu idioma.
Key kotlin.orm.eager-fetch-type · Severity warning · Category orm
Flags @OneToMany / @ManyToMany relations declared with fetch = FetchType.EAGER - every load of the owner drags the collection along.
Incorrect
Section titled “Incorrect”@OneToMany(fetch = FetchType.EAGER)val items: List<Item>Correct
Section titled “Correct”@OneToMany(fetch = FetchType.LAZY)val items: List<Item>Keep collections LAZY and fetch-join where a use case needs them.