This is what I essentially need to do (https://stackoverflow.com/questions/28590173/sql-inner-joining-to-left-joined-table) and like this (https://stackoverflow.com/questions/9685289/using-left-join-and-inner-join-in-the-same-query#answer-56815807).
What is happening is I have a
content table, and junction table
content_taxonomy_term. I need to get all terms for a specific taxonomy for a specific piece of content. So, I want to left join
taxonomy_term and inner join
taxonomy so that it only queries for terms that are for ‘categories’ for example. I have been trying to set up relations on the Content model so that I can get all ‘categories’ but I can’t seem to set it up properly using hasMany and am struggling to figure out how to do this at all.