docs: use mappedBy property for all relationship types (#12973)
This commit is contained in:
1 parent
5527d95b5c
commit
ab82e4c9fa
8 files changed
+175
-121
No files matched your search
@@ -122,7 +122,9 @@ export const Restaurant = model.define("restaurant", {
|
||||
email: model.text(),
|
||||
address: model.text(),
|
||||
image_url: model.text().nullable(),
|
||||
admins: model.hasMany(() => RestaurantAdmin),
|
||||
admins: model.hasMany(() => RestaurantAdmin, {
|
||||
mappedBy: "restaurant",
|
||||
}),
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
@@ -135,7 +135,9 @@ const Vendor = model.define("vendor", {
|
||||
handle: model.text().unique(),
|
||||
name: model.text(),
|
||||
logo: model.text().nullable(),
|
||||
admins: model.hasMany(() => VendorAdmin),
|
||||
admins: model.hasMany(() => VendorAdmin, {
|
||||
mappedBy: "vendor",
|
||||
}),
|
||||
})
|
||||
|
||||
export default Vendor
|
||||
|
||||
Reference in new issue
Block a user