Commit 562f45d0 authored by duxet's avatar duxet

Fixed eager loading of nested relations #138

parent 74c9780d
...@@ -364,6 +364,11 @@ class EmbedsMany extends Relation { ...@@ -364,6 +364,11 @@ class EmbedsMany extends Relation {
$models[] = $model; $models[] = $model;
} }
if (count($models) > 0)
{
$models = $this->eagerLoadRelations($models);
}
return $this->related->newCollection($models); return $this->related->newCollection($models);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment