Hydrahon icon indicating copy to clipboard operation
Hydrahon copied to clipboard

Subselect for Join operations

Open lucas-facchini opened this issue 6 years ago • 1 comments

Is there any possibility to build a query which uses a join with subselect, eg:

$t2 = $qb->table('table2')->select(array('t2.id'));
$qb->table('table1 as t1')->select()->join(array('t2' =>$2));

The code above would translate to:

select * from table1 as t1 join (select id from table2) as t2 on t2.id = t1.ref

lucas-facchini avatar Nov 05 '18 13:11 lucas-facchini

This is currently not possible. But I've looked into it and it seems to be not that hard to implement it.

mario-deluna avatar Nov 22 '18 08:11 mario-deluna