Nested leftJoin on Mjoin

Nested leftJoin on Mjoin

we0038we0038 Posts: 39Questions: 13Answers: 1

consider this one-to-many example https://editor.datatables.net/examples/advanced/joinArray.html

how do I make a left-join inside the Mjoin

my simplified tables
user (id, name)
task (id, description)
task_progress (id, task_id, user_id)

what I am trying to do is Mjoin task_progress on task
however, I was unable to get user.name by leftJoin on task_progress.user_id

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    I'm sorry - currently the Mjoin class doesn't provide the ability to do a left join to other tables.

    The workaround is to create a VIEW that would do the left join and let Editor read the data from that.

    Allan

  • we0038we0038 Posts: 39Questions: 13Answers: 1

    thanks Allan. The view is just enough.

This discussion has been closed.