Skip to content

This is a sample project to reproduce a known bug in lucid ORM with Adonis

Notifications You must be signed in to change notification settings

Marian0/adonis-lucid-playground

Repository files navigation

Adonis/Lucid Playground project

This project was created to reproduce a bug on preload method.

How to run it

  • Setup postgres instance

  • copy default env cp .env.example .env

  • Edit .env with your postgres values

  • Run migrations node ace migration:run

  • Hit endpoint to create sample data http://127.0.0.1:3333/create

  • Hit endpoint to get data http://127.0.0.1:3333/get

  • If you check console debug queries you should see something like this:

"pg" Post (3.16 ms) SELECT * FROM "posts" WHERE "title" = ? [ 'post 2' ]
"pg" Category (2.32 ms) SELECT * FROM "categories" WHERE 1 = ? [ 0 ]

The second query should not be fired since is a nullable relation

About

This is a sample project to reproduce a known bug in lucid ORM with Adonis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published