It would be nice to add to the main Engine API the possibility of include joined collections.
This could be really easily with an IN clause, although I need to put some care in the implementation.
A possible API:
<?php
$engine->find($ctx, User::class)->of(Group::class, 'userId')->andWhere('id = ?', 1);
$finder = $engine->find($ctx, Group::class)->andWhere('id = ?', 1);
$engine->find($ctx, User::class)->in(Group::class, 'userId', $finder);
It would be nice to add to the main
EngineAPI the possibility of include joined collections.This could be really easily with an
INclause, although I need to put some care in the implementation.A possible API: