Ir al contenido

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.

@OneToMany(fetch = FetchType.EAGER)
val items: List<Item>
@OneToMany(fetch = FetchType.LAZY)
val items: List<Item>

Keep collections LAZY and fetch-join where a use case needs them.