From 5c30ebbfac1caf7c0b4fa4ddb62fb68970d14df3 Mon Sep 17 00:00:00 2001 From: m0sviatoslav Date: Tue, 29 Jan 2019 12:38:01 +0200 Subject: [PATCH] added interface to resources and mappings --- src/Resources/config/doctrine/ShippingExport.orm.yml | 2 +- src/Resources/config/doctrine/ShippingGateway.orm.yml | 2 +- src/Resources/config/resource/bitbag_shipping_export.yml | 1 + src/Resources/config/resource/bitbag_shipping_gateway.yml | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Resources/config/doctrine/ShippingExport.orm.yml b/src/Resources/config/doctrine/ShippingExport.orm.yml index 44846b1..460e012 100644 --- a/src/Resources/config/doctrine/ShippingExport.orm.yml +++ b/src/Resources/config/doctrine/ShippingExport.orm.yml @@ -30,7 +30,7 @@ BitBag\SyliusShippingExportPlugin\Entity\ShippingExport: cascade: ['ALL'] manyToOne: shippingGateway: - targetEntity: BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway + targetEntity: BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface inversedBy: shippingExports joinColumn: name: shipping_gateway_id diff --git a/src/Resources/config/doctrine/ShippingGateway.orm.yml b/src/Resources/config/doctrine/ShippingGateway.orm.yml index ad3c9a5..8375974 100644 --- a/src/Resources/config/doctrine/ShippingGateway.orm.yml +++ b/src/Resources/config/doctrine/ShippingGateway.orm.yml @@ -30,6 +30,6 @@ BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway: referencedColumnName: id oneToMany: shippingExports: - targetEntity: BitBag\SyliusShippingExportPlugin\Entity\ShippingExport + targetEntity: BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface mappedBy: shippingGateway orphanRemoval: true diff --git a/src/Resources/config/resource/bitbag_shipping_export.yml b/src/Resources/config/resource/bitbag_shipping_export.yml index e25903e..c579616 100644 --- a/src/Resources/config/resource/bitbag_shipping_export.yml +++ b/src/Resources/config/resource/bitbag_shipping_export.yml @@ -3,6 +3,7 @@ sylius_resource: bitbag.shipping_export: classes: model: BitBag\SyliusShippingExportPlugin\Entity\ShippingExport + interface: BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface repository: BitBag\SyliusShippingExportPlugin\Repository\ShippingExportRepository form: BitBag\SyliusShippingExportPlugin\Form\Type\ShippingGatewayType controller: BitBag\SyliusShippingExportPlugin\Controller\ShippingExportController diff --git a/src/Resources/config/resource/bitbag_shipping_gateway.yml b/src/Resources/config/resource/bitbag_shipping_gateway.yml index 5f34812..719478e 100644 --- a/src/Resources/config/resource/bitbag_shipping_gateway.yml +++ b/src/Resources/config/resource/bitbag_shipping_gateway.yml @@ -3,6 +3,7 @@ sylius_resource: bitbag.shipping_gateway: classes: model: BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway + interface: BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface repository: BitBag\SyliusShippingExportPlugin\Repository\ShippingGatewayRepository form: BitBag\SyliusShippingExportPlugin\Form\Type\ShippingGatewayType controller: BitBag\SyliusShippingExportPlugin\Controller\ShippingGatewayController