ClanCats/Hydrahon

Subselect for Join operations

Opened this issue · 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

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