MetaCredo.Check.Warning.MissingPreload (MetaCredo v0.1.0)

View Source

Detects collection operations (e.g. Enum.map) over database query results that were fetched without eager loading. This pattern is a strong indicator of potential N+1 queries when associations are accessed inside the loop.

Use Repo.preload/2 or from(..., preload: [...]) before iterating.

Category: Warning / Priority: high