feat: add check for uniqueness when creating links with isList=false (#11767)
This commit is contained in:
@@ -46,6 +46,7 @@ medusaIntegrationTestRunner({
|
||||
entity: "Currency",
|
||||
primaryKey: "code",
|
||||
foreignKey: "currency_code",
|
||||
isList: true,
|
||||
alias: "currency",
|
||||
args: {
|
||||
methodSuffix: "Currencies",
|
||||
@@ -58,6 +59,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
alias: "region",
|
||||
isList: false,
|
||||
args: {
|
||||
methodSuffix: "Regions",
|
||||
},
|
||||
@@ -88,9 +90,9 @@ medusaIntegrationTestRunner({
|
||||
serviceName: "region",
|
||||
entity: "Region",
|
||||
fieldAlias: {
|
||||
currency: {
|
||||
currencies: {
|
||||
path: "currency_link.currency",
|
||||
isList: false,
|
||||
isList: true,
|
||||
forwardArgumentsOnPath: ["currency_link.currency"],
|
||||
},
|
||||
},
|
||||
@@ -100,7 +102,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKey: "region_id",
|
||||
foreignKey: "id",
|
||||
alias: "currency_link",
|
||||
isList: false,
|
||||
isList: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -145,6 +147,7 @@ medusaIntegrationTestRunner({
|
||||
entity: "ProductVariant",
|
||||
primaryKey: "id",
|
||||
foreignKey: "product_variant_id",
|
||||
isList: true,
|
||||
alias: "product_variant",
|
||||
args: {
|
||||
methodSuffix: "ProductVariants",
|
||||
@@ -156,6 +159,7 @@ medusaIntegrationTestRunner({
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
isList: false,
|
||||
alias: "region",
|
||||
args: {
|
||||
methodSuffix: "Regions",
|
||||
@@ -187,9 +191,9 @@ medusaIntegrationTestRunner({
|
||||
serviceName: "region",
|
||||
entity: "Region",
|
||||
fieldAlias: {
|
||||
product_variant: {
|
||||
product_variants: {
|
||||
path: "product_variant_link.product_variant",
|
||||
isList: false,
|
||||
isList: true,
|
||||
forwardArgumentsOnPath: [
|
||||
"product_variant_link.product_variant",
|
||||
],
|
||||
@@ -201,7 +205,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKey: "region_id",
|
||||
foreignKey: "id",
|
||||
alias: "product_variant_link",
|
||||
isList: false,
|
||||
isList: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -249,6 +253,7 @@ medusaIntegrationTestRunner({
|
||||
entity: "Currency",
|
||||
primaryKey: "code",
|
||||
foreignKey: "currency_code",
|
||||
isList: true,
|
||||
alias: "currency",
|
||||
args: {
|
||||
methodSuffix: "Currencies",
|
||||
@@ -260,6 +265,7 @@ medusaIntegrationTestRunner({
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
isList: false,
|
||||
alias: "region",
|
||||
args: {
|
||||
methodSuffix: "Regions",
|
||||
@@ -291,9 +297,9 @@ medusaIntegrationTestRunner({
|
||||
serviceName: "region",
|
||||
entity: "Region",
|
||||
fieldAlias: {
|
||||
currency: {
|
||||
currencies: {
|
||||
path: "currency_link.currency",
|
||||
isList: false,
|
||||
isList: true,
|
||||
forwardArgumentsOnPath: ["currency_link.currency"],
|
||||
},
|
||||
},
|
||||
@@ -303,7 +309,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKey: "region_id",
|
||||
foreignKey: "id",
|
||||
alias: "currency_link",
|
||||
isList: false,
|
||||
isList: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -347,6 +353,7 @@ medusaIntegrationTestRunner({
|
||||
entity: "Currency",
|
||||
primaryKey: "code",
|
||||
foreignKey: "currency_code",
|
||||
isList: true,
|
||||
alias: "currency",
|
||||
args: {
|
||||
methodSuffix: "Currencies",
|
||||
@@ -358,6 +365,7 @@ medusaIntegrationTestRunner({
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
isList: true,
|
||||
alias: "region",
|
||||
args: {
|
||||
methodSuffix: "Regions",
|
||||
@@ -389,9 +397,9 @@ medusaIntegrationTestRunner({
|
||||
serviceName: "region",
|
||||
entity: "Region",
|
||||
fieldAlias: {
|
||||
currency: {
|
||||
currencies: {
|
||||
path: "currency_link.currency",
|
||||
isList: false,
|
||||
isList: true,
|
||||
forwardArgumentsOnPath: ["currency_link.currency"],
|
||||
},
|
||||
},
|
||||
@@ -401,7 +409,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKey: "region_id",
|
||||
foreignKey: "id",
|
||||
alias: "currency_link",
|
||||
isList: false,
|
||||
isList: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user