-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from pbalcerzak/doctrine_mapping
Changed mapping to XML
- Loading branch information
Showing
4 changed files
with
69 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | ||
http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<mapped-superclass name="BitBag\SyliusShippingExportPlugin\Entity\ShippingExport" table="bitbag_shipping_export"> | ||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO"/> | ||
</id> | ||
|
||
<field name="exportedAt" column="exported_at" type="datetime" nullable="true"/> | ||
|
||
<field name="labelPath" column="label_path" type="string" nullable="true"/> | ||
|
||
<field name="state" column="state" type="string" nullable="false"/> | ||
|
||
<field name="externalId" column="external_id" type="string" nullable="true"/> | ||
|
||
<one-to-one field="shipment" target-entity="Sylius\Component\Shipping\Model\ShipmentInterface"> | ||
<cascade> | ||
<cascade-all/> | ||
</cascade> | ||
|
||
<join-column name="shipment_id" referenced-column-name="id" /> | ||
</one-to-one> | ||
|
||
<many-to-one field="shippingGateway" target-entity="BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface" inversed-by="shippingExports"> | ||
<cascade> | ||
<cascade-all/> | ||
</cascade> | ||
|
||
<join-column name="shipping_gateway_id" referenced-column-name="id" /> | ||
</many-to-one> | ||
</mapped-superclass> | ||
</doctrine-mapping> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | ||
http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<mapped-superclass name="BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway" table="bitbag_shipping_gateway"> | ||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO"/> | ||
</id> | ||
|
||
<field name="code" column="code" type="string" nullable="false"/> | ||
|
||
<field name="config" column="config" type="json_array" nullable="false"/> | ||
|
||
<field name="name" column="name" type="string" nullable="false"/> | ||
|
||
<many-to-many field="shippingMethods" target-entity="Sylius\Component\Core\Model\ShippingMethodInterface"> | ||
<join-table name="bitbag_shipping_gateway_method"> | ||
<join-columns> | ||
<join-column name="shipping_gateway_id" referenced-column-name="id" nullable="false" /> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="shipping_method_id" referenced-column-name="id" nullable="false"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
<one-to-many field="shippingExports" target-entity="BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface" mapped-by="shippingGateway" orphan-removal="true"/> | ||
</mapped-superclass> | ||
</doctrine-mapping> |
This file was deleted.
Oops, something went wrong.