Maybe I am doing something wrong here, but I am unable to join on multiple tables when using createBuilder(). Here is an example query.
$test = $this->modelsManager->createBuilder()
->from('TABLE1')
->leftJoin('TABLE2', 'TABLE1.id = TABLE2.table_one_id')
->leftJoin'TABLE3', 'TABLE3.id = TABLE2.table_three_id')
->where('TABLE1.id = :id:', array('id' => $id))
->groupBy(array('TABLE1.id'))
->getQuery()
->execute();
There error indicates that the SQL query is probably not being generated correctly by the framework, but I could very well be doing something wrong. It appears that no space is being added before the additional LEFT join.
Unknown column 'TABLE2.table_one_idLEFT' in 'on clause''
Any insight would be greatly appreciated.