Skip to content

What is the difference between ''join([innerJoin(), innerJoin()])'' and ''join([innerJoin()]).join([innerJoin()]) ''? #2004

Answered by simolus3
ddxl123 asked this question in Q&A
Discussion options

You must be logged in to vote

There is no difference. Calling join multiple times will add the joins as well.

MatherAndFather does not use sons to compare with mathers, so is there a problem with the query?

No, this is completely fine! Not all joins have to reference the original table, doing it like this should work. However, there is an optimization opportunity if you don't need all tables in the end. If you only care about some tables in the result (for instance, if you only need sons and mathers and joined fathers for the sole purpose of doing the second join), you can set includeColumns: false on the join to disable including it in the results. Bug again, this is just a matter of optimization - your existing wa…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ddxl123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants