You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I have an idea!
Example relation:
When querying multiple parents with
$select->load('child')
, I want cycle to efficiently split up allchild_type
's and bulk-query each of them. I.e: if I have 50 parents with 20 childs ofchild1
and 30 childs ofchild2
, it will take only 2 queries to load them: 1 forchild1
and 1 forchild2
.The text was updated successfully, but these errors were encountered: