Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

adonis preload recursive

const users = await User
  .query()
  .preload('posts', (postsQuery) => {
    postsQuery.preload('comments', (commentsQuery) => {
      commentsQuery.preload('user')
    })
  })
Source by docs.adonisjs.com #
 
PREVIOUS NEXT
Tagged: #adonis #preload #recursive
ADD COMMENT
Topic
Name
9+7 =