Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

adonis join condition

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 #condition
ADD COMMENT
Topic
Name
3+1 =