Skip to content

Commit cf15156

Browse files
authored
Merge pull request #1343 from robbytaylor/master
Fix Unable to set a custom collection for models
2 parents 8c17827 + 91222dd commit cf15156

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)