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
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,8 @@ class User extends Eloquent {
94
94
}
95
95
```
96
96
97
+
Embedded relations now return an `Illuminate\Database\Eloquent\Collection` rather than a custom Collection class. If you were using one of the special methods that were available, convert them to Collection operations.
98
+
97
99
Configuration
98
100
-------------
99
101
@@ -558,6 +560,8 @@ Supported relations are:
558
560
- hasMany
559
561
- belongsTo
560
562
- belongsToMany
563
+
- embedsOne
564
+
- embedsMany
561
565
562
566
Example:
563
567
@@ -611,6 +615,8 @@ Other relations are not yet supported, but may be added in the future. Read more
611
615
612
616
If you want to embed models, rather than referencing them, you can use the `embedsMany` relation. This relation is similar to the `hasMany` relation, but embeds the models inside the parent object.
613
617
618
+
**REMEMBER**: these relations return Eloquent collections, they don't return query builder objects!
619
+
614
620
```php
615
621
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
0 commit comments