📜  adonis join with multi condictions - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:00.283000             🧑  作者: Mango

代码示例1
...
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’]))
  })
...