As you can see in the docs an associative array is only used if you want to use literal values (like true
, a specific number, datetime or whatever) in your join condition.
https://book.cakephp.org/3/en/orm/query-builder.html#adding-joins
But if you want to reference other tables columns you need to put it all in one string.