docs: fixes to customization docs (#9236)
Closes #9225, #9224, #9226, #9227 Closes DOCS-948, DOCS-947, DOCS-945, DOCS-946
This commit is contained in:
@@ -160,7 +160,7 @@ export const updateAssociationHighlights = [
|
||||
const product = await helloModuleService.retrieveProduct(
|
||||
"123",
|
||||
{
|
||||
relations: ["orders"]
|
||||
relations: ["orders"],
|
||||
}
|
||||
)
|
||||
|
||||
@@ -169,7 +169,7 @@ const updatedProduct = await helloModuleService.updateProducts({
|
||||
// other properties...
|
||||
orders: [
|
||||
...product.orders.map((order) => order.id),
|
||||
"321"
|
||||
"321",
|
||||
],
|
||||
})
|
||||
```
|
||||
|
||||
@@ -151,14 +151,14 @@ import { model } from "@medusajs/utils"
|
||||
const Order = model.define("order", {
|
||||
id: model.id().primaryKey(),
|
||||
products: model.manyToMany(() => Product, {
|
||||
mappedBy: "orders"
|
||||
mappedBy: "orders",
|
||||
}),
|
||||
})
|
||||
|
||||
const Product = model.define("product", {
|
||||
id: model.id().primaryKey(),
|
||||
orders: model.manyToMany(() => Order, {
|
||||
mappedBy: "products"
|
||||
mappedBy: "products",
|
||||
}),
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user