Nested leftJoin on Mjoin

Nested leftJoin on Mjoin

we0038we0038 Posts: 2Questions: 1Answers: 0

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: 44,780Questions: 1Answers: 6,018 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: 2Questions: 1Answers: 0

    thanks Allan. The view is just enough.

Sign In or Register to comment.