Skip to content

Multiple Joins #128

@daninus14

Description

@daninus14

I would like to be able to do multiple joins with mito. Right now, includes only allows for one join, but for a regular m-n relationship, where we have tables A, A_TO_B, and B, I want to be able to include table B as well.

In SQL this would be just

SELECT *
FROM A
LEFT JOIN A_TO_B
ON A.ID = A_TO_B.A_ID
LEFT JOIN B
ON A_TO_B.B_ID = B.ID;

Right now, unless I misunderstood something, the includes only allows for one join. I think there should be a way to simply have another includes, within some expression to provide the context of which class is including which other class, to allow for the second join

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions