Skip to content

Commit 16fe43f

Browse files
authored
fix(order): add data model name in define schema (medusajs#11181)
Add missing data model name in `model.define` in the Order Module where missing, as we need to infer the names in the references we generate Closes DX-1305
1 parent 040b7b2 commit 16fe43f

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

.changeset/rotten-trainers-lie.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/order": patch
3+
---
4+
5+
fix(order): add data model name in define schema

packages/modules/order/src/models/order-summary.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const _OrderSummary = model
55
.define(
66
{
77
tableName: "order_summary",
8+
name: "OrderSummary",
89
},
910
{
1011
id: model.id({ prefix: "ordsum" }).primaryKey(),

packages/modules/order/src/models/return-item.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ReturnReason } from "./return-reason"
66
const _ReturnItem = model
77
.define(
88
{
9+
name: "ReturnItem",
910
tableName: "return_item",
1011
},
1112
{

packages/modules/order/src/models/shipping-method-adjustment.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const _OrderShippingMethodAdjustment = model
55
.define(
66
{
77
tableName: "order_shipping_method_adjustment",
8+
name: "OrderShippingMethodAdjustment",
89
},
910
{
1011
id: model.id({ prefix: "ordsmadj" }).primaryKey(),

packages/modules/order/src/models/shipping-method-tax-line.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const _OrderShippingMethodTaxLine = model
55
.define(
66
{
77
tableName: "order_shipping_method_tax_line",
8+
name: "OrderShippingMethodTaxLine",
89
},
910
{
1011
id: model.id({ prefix: "ordsmtxl" }).primaryKey(),

0 commit comments

Comments
 (0)