I need to join my 3rd party table with a standard ElementCriteriaModel (ECM). I'd like to start with an ordinary ECM, so my plugin will be compatible with any element type which may exist, now or in the future.
By default, an ECM generates a query which joins multiple native tables. According to Brad in this answer...
... think of ElementCriteriaModel as an abstraction on top of DbCommand that makes it easy to search for Elements.
My plugin does not have either a custom Field Type or custom Element Type (which means I can't use modifyElementsQuery
when retrieving the data).
How can I expand my ECM query to take additional SQL commands into account?