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:
Shahed Nasser
2024-09-26 13:00:37 +00:00
committed by GitHub
parent 474ba92d48
commit ea2cc974cc
10 changed files with 53 additions and 45 deletions
@@ -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",
}),
})
```