@adityadarma/adonis-relations
v0.2.2
Published
Package for nested relationship on AdonisJS
Readme
Adonis Nested Relationship
A utility to safely and elegantly handle nested relationships in AdonisJS using strict typing and intuitive syntax.
Installation
node ace add @adityadarma/adonis-relationsUsage
// after : is column name, you can add with camelCase or snake_case
await User.query().relations([
'relationName:id,name',
'relationName.relationName2:id,name',
'relationName.relationName2.relationName3.relationName4',
{
'relationName': function (query) {
query.select('*')
},
},
])License
This package is open-sourced software licensed under the MIT license.
