Open
Description
I have an idea!
Example relation:
class Parent
{
#[Cycle\Relation\Morphed\BelongsToMorphed(
target: ChildInterface::class,
innerKey: 'child_id',
morphKey: 'child_type',
)]
public ?ChildInterface $child = null;
When querying multiple parents with $select->load('child')
, I want cycle to efficiently split up all child_type
's and bulk-query each of them. I.e: if I have 50 parents with 20 childs of child1
and 30 childs of child2
, it will take only 2 queries to load them: 1 for child1
and 1 for child2
.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo