Skip to content

Commit

Permalink
Merge pull request #23 from umpirsky/fix/shipping-rules-mapping
Browse files Browse the repository at this point in the history
Fixed #22
  • Loading branch information
Paweł Jędrzejewski committed Jun 3, 2013
2 parents 106d7a9 + 8e06565 commit b10ec1c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Resources/config/doctrine/DefaultShippingMethod.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
<id name="id" column="id" type="integer">
<generator strategy="AUTO" />
</id>
<one-to-many field="rules" target-entity="Sylius\Bundle\ShippingBundle\Model\RuleInterface" mapped-by="method">
<cascade>
<cascade-all />
</cascade>
</one-to-many>
</entity>

</doctrine-mapping>
2 changes: 1 addition & 1 deletion Resources/config/doctrine/Rule.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">

<entity name="Sylius\Bundle\PromotionsBundle\Entity\Rule" table="sylius_shipping_rule">
<entity name="Sylius\Bundle\ShippingBundle\Entity\Rule" table="sylius_shipping_rule">
<id name="id" type="integer">
<generator strategy="AUTO" />
</id>
Expand Down
5 changes: 0 additions & 5 deletions Resources/config/doctrine/ShippingMethod.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
</many-to-one>
<field name="categoryRequirement" column="category_requirement" type="integer" />
<field name="calculator" column="calculator" type="string" />
<one-to-many field="rules" target-entity="Sylius\Bundle\ShippingBundle\Model\RuleInterface" mapped-by="method">
<cascade>
<cascade-all />
</cascade>
</one-to-many>
<field name="enabled" column="is_enabled" type="boolean" />
<field name="createdAt" column="created_at" type="datetime">
<gedmo:timestampable on="create"/>
Expand Down
1 change: 1 addition & 0 deletions Resources/config/driver/doctrine/orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<parameters>
<parameter key="sylius.model.shipping_category.class">Sylius\Bundle\ShippingBundle\Entity\DefaultShippingCategory</parameter>
<parameter key="sylius.model.shipping_method.class">Sylius\Bundle\ShippingBundle\Entity\DefaultShippingMethod</parameter>
<parameter key="sylius.model.shipping_rule.class">Sylius\Bundle\ShippingBundle\Entity\Rule</parameter>

<parameter key="sylius.repository.shipment.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
<parameter key="sylius.repository.shipment_item.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
Expand Down

0 comments on commit b10ec1c

Please sign in to comment.