Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

adonis join with multi condictions

...
let posts = await Posts
  .query()
  .leftJoin(‘post_titles’, function () {
    this
    .on(‘post_titles.post_id’, ‘posts.id’)
    .andOn(‘post_titles.lang_code’, Database.raw(’?’, [‘EN’]))
  })
...
Source by forum.adonisjs.com #
 
PREVIOUS NEXT
Tagged: #adonis #join #multi #condictions
ADD COMMENT
Topic
Name
7+1 =