Enabling and Using Soft Deletes in AdonisJS Lucid ORM (v5 & v6)
Step‑by‑step guide to add, use, and verify soft deletes in AdonisJS Lucid ORM for both version 5 and 6, including migration, model changes, querying, restoring, and caveats.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Step‑by‑step guide to add, use, and verify soft deletes in AdonisJS Lucid ORM for both version 5 and 6, including migration, model changes, querying, restoring, and caveats.
Learn how to implement server-side pagination in AdonisJS using Lucid's paginate() method to prevent memory exhaustion and optimize API performance.
AdonisJS 5 Lucid paginate() runs COUNT(*) plus LIMIT/OFFSET. Cap perPage, coerce query strings, and verify query plans before shipping list endpoints.
Use AdonisJS Lucid preload to fetch related records in one extra query instead of one per row.
Offset pagination in AdonisJS Lucid is trivial but degrades on large tables. Learn when to keep `paginate()` and when to hand-roll keyset cursors.
Learn how to use Lucid ORM's preload method in AdonisJS to eliminate N+1 queries, with a worked example, pagination tips, and trade-offs to consider.
Stop killing your database with N+1 queries. Learn how to use Lucid's preload mechanism in AdonisJS to fetch relationships efficiently and keep your application fast.
How to chain .preload() before .paginate() in AdonisJS to avoid N+1 queries, respect pagination metadata, and protect fillable guards.
A diagnostic guide for N+1 queries in AdonisJS Lucid. Recognize repeating SELECTs, check .load() usage and version, and verify batch eager loading with query logs and $relations.