Skip to content

Commit ea61db2

Browse files
committed
Merge pull request mongodb#1343 from robbytaylor/master
Fix Unable to set a custom collection for models
2 parents e91e229 + 1834365 commit ea61db2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jenssegers/Mongodb/Relations/EmbedsOneOrMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ protected function toCollection(array $records = [])
267267
$models = $this->eagerLoadRelations($models);
268268
}
269269

270-
return new Collection($models);
270+
return $this->related->newCollection($models);
271271
}
272272

273273
/**

0 commit comments

Comments
 (0)