-
Notifications
You must be signed in to change notification settings - Fork 158
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 #422 from Kazadri/doctrine-xml-mapping
Switch to xml mapping for doctrine
- Loading branch information
Showing
20 changed files
with
346 additions
and
405 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,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping xmlns="https://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<mapped-superclass name="BitBag\SyliusCmsPlugin\Entity\Block" table="bitbag_cms_block"> | ||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO"/> | ||
</id> | ||
|
||
<field name="code" column="code" type="string" length="64" unique="true"/> | ||
|
||
<field name="enabled" column="enabled" type="boolean"/> | ||
|
||
<many-to-many field="sections" target-entity="BitBag\SyliusCmsPlugin\Entity\SectionInterface"> | ||
<join-table name="bitbag_cms_block_sections"> | ||
<join-columns> | ||
<join-column name="block_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="section_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
<many-to-many field="products" target-entity="Sylius\Component\Product\Model\ProductInterface"> | ||
<join-table name="bitbag_cms_block_products"> | ||
<join-columns> | ||
<join-column name="block_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="product_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
<many-to-many field="taxonomies" target-entity="Sylius\Component\Taxonomy\Model\TaxonInterface"> | ||
<join-table name="bitbag_cms_block_taxonomies"> | ||
<join-columns> | ||
<join-column name="block_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="taxon_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
<many-to-many field="channels" target-entity="Sylius\Component\Channel\Model\ChannelInterface"> | ||
<join-table name="bitbag_cms_block_channels"> | ||
<join-columns> | ||
<join-column name="block_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="channel_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
</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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping xmlns="https://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<mapped-superclass name="BitBag\SyliusCmsPlugin\Entity\BlockTranslation" table="bitbag_cms_block_translation"> | ||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO"/> | ||
</id> | ||
|
||
<field name="name" column="name" type="string" nullable="true"/> | ||
|
||
<field name="content" column="content" type="text" nullable="true"/> | ||
|
||
<field name="link" column="link" type="text" nullable="true"/> | ||
</mapped-superclass> | ||
</doctrine-mapping> |
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.xml
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,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping xmlns="https://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<mapped-superclass name="BitBag\SyliusCmsPlugin\Entity\FrequentlyAskedQuestion" table="bitbag_cms_faq"> | ||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO"/> | ||
</id> | ||
|
||
<field name="code" column="code" type="string" nullable="false"/> | ||
|
||
<field name="position" column="position" type="integer" nullable="false"/> | ||
|
||
<field name="enabled" column="enabled" type="boolean" nullable="false"/> | ||
|
||
<many-to-many field="channels" target-entity="Sylius\Component\Channel\Model\ChannelInterface"> | ||
<join-table name="bitbag_cms_faq_channels"> | ||
<join-columns> | ||
<join-column name="faq_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="channel_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
</mapped-superclass> | ||
</doctrine-mapping> |
35 changes: 0 additions & 35 deletions
35
src/Resources/config/doctrine/FrequentlyAskedQuestion.orm.yml
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.xml
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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping xmlns="https://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<mapped-superclass name="BitBag\SyliusCmsPlugin\Entity\FrequentlyAskedQuestionTranslation" table="bitbag_cms_faq_translation"> | ||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO"/> | ||
</id> | ||
|
||
<field name="question" column="question" type="text" nullable="false"/> | ||
|
||
<field name="answer" column="answer" type="text" nullable="false"/> | ||
|
||
</mapped-superclass> | ||
</doctrine-mapping> |
18 changes: 0 additions & 18 deletions
18
src/Resources/config/doctrine/FrequentlyAskedQuestionTranslation.orm.yml
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,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping xmlns="https://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping | ||
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<mapped-superclass name="BitBag\SyliusCmsPlugin\Entity\Media" table="bitbag_cms_media"> | ||
<id name="id" column="id" type="integer"> | ||
<generator strategy="AUTO"/> | ||
</id> | ||
|
||
<field name="code" column="code" type="string" length="250" unique="true"/> | ||
|
||
<field name="type" column="type" type="string" length="250"/> | ||
|
||
<field name="path" column="path" type="string" length="250" unique="true"/> | ||
|
||
<field name="mimeType" column="mime_type" type="string" length="250" nullable="true"/> | ||
|
||
<field name="enabled" column="enabled" type="boolean"/> | ||
|
||
<field name="width" column="width" type="integer" nullable="true"/> | ||
|
||
<field name="height" column="height" type="integer" nullable="true"/> | ||
|
||
<many-to-many field="sections" target-entity="BitBag\SyliusCmsPlugin\Entity\SectionInterface"> | ||
<join-table name="bitbag_cms_media_sections"> | ||
<join-columns> | ||
<join-column name="media_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="section_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
<many-to-many field="products" target-entity="Sylius\Component\Product\Model\ProductInterface"> | ||
<join-table name="bitbag_cms_media_products"> | ||
<join-columns> | ||
<join-column name="media_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="product_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
<many-to-many field="channels" target-entity="Sylius\Component\Channel\Model\ChannelInterface"> | ||
<join-table name="bitbag_cms_media_channels"> | ||
<join-columns> | ||
<join-column name="block_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</join-columns> | ||
<inverse-join-columns> | ||
<join-column name="channel_id" referenced-column-name="id" nullable="false" on-delete="CASCADE"/> | ||
</inverse-join-columns> | ||
</join-table> | ||
</many-to-many> | ||
|
||
</mapped-superclass> | ||
</doctrine-mapping> |
Oops, something went wrong.