Commit 234cfd51 authored by Jens Segers's avatar Jens Segers

Merge pull request #140 from duxet/master

Fixed eager loading of nested relations #138
parents 74c9780d 562f45d0
...@@ -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