fix: adjustments based on seb's feedback
- remove eager from shipping_option relationship in `models/custom-shipping-options.ts` - remove custom_shipping_options relation from cart model
This commit is contained in:
@@ -44,8 +44,6 @@
|
||||
* $ref: "#/components/schemas/payment_session"
|
||||
* payment:
|
||||
* $ref: "#/components/schemas/payment"
|
||||
* custom_shipping_options:
|
||||
* $ref: "#/components/schemas/custom_shipping_option"
|
||||
* shipping_methods:
|
||||
* type: array
|
||||
* items:
|
||||
@@ -221,13 +219,6 @@ export class Cart {
|
||||
@JoinColumn({ name: "payment_id" })
|
||||
payment: Payment
|
||||
|
||||
@OneToMany(
|
||||
() => CustomShippingOption,
|
||||
method => method.cart,
|
||||
{ cascade: ["insert"] }
|
||||
)
|
||||
custom_shipping_options: CustomShippingOption[]
|
||||
|
||||
@OneToMany(
|
||||
() => ShippingMethod,
|
||||
method => method.cart,
|
||||
|
||||
@@ -29,7 +29,7 @@ export class CustomShippingOption {
|
||||
@Column()
|
||||
shipping_option_id: string;
|
||||
|
||||
@ManyToOne(() => ShippingOption, { eager: true })
|
||||
@ManyToOne(() => ShippingOption)
|
||||
@JoinColumn({ name: "shipping_option_id" })
|
||||
shipping_option: ShippingOption
|
||||
|
||||
|
||||
Reference in New Issue
Block a user