Eager Fetch Type (ARCH8060)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
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.