Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

LeftJoin Same table twice

Hi, I'm trying to make a leftJoin in the same table twitce, but only retrieve c, and m2 columns

$select =
    $this->getModelsManager()->createBuilder()
        ->addFrom('\\Apps\\Models\\Conteudos', 'c')
        ->leftJoin('\\Apps\\Models\\Midias', 'm.id = c.id_midias', 'm')
        ->leftJoin('\\Apps\\Models\\Midias', 'm2.id = c.id_destaque', 'm2')
        ->columns( array( 'c.*','m.*', 'm2.*'));


4.2k
Accepted
answer

Sorry can be closes 2.0.3 problem is gone!!