Add missing mapping files
This commit is contained in:
parent
b147c472be
commit
1e95110b08
40
tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Book.orm.xml
Normal file
40
tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Book.orm.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?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
|
||||||
|
https://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">
|
||||||
|
|
||||||
|
<mapped-superclass name="SocialLibrary\ReadBundle\Entity\Book">
|
||||||
|
<id name="id" type="integer">
|
||||||
|
<generator strategy="AUTO" />
|
||||||
|
</id>
|
||||||
|
<field name="volume" column="volume" type="integer" nullable="true" />
|
||||||
|
<field name="language" column="language" type="string" length="8" nullable="true" />
|
||||||
|
<field name="isbn10" column="isbn10" type="string" length="11" unique="true" nullable="true" />
|
||||||
|
<field name="isbn13" column="isbn13" type="string" length="14" unique="true" nullable="true" />
|
||||||
|
<many-to-one field="serie" target-entity="SocialLibrary\ReadBundle\Entity\Serie" inversed-by="volumes">
|
||||||
|
<join-column name="serie_id" referenced-column-name="id" />
|
||||||
|
</many-to-one>
|
||||||
|
<many-to-many field="owners" target-entity="Application\Sonata\UserBundle\Entity\User">
|
||||||
|
<join-table name="book__owner">
|
||||||
|
<join-columns>
|
||||||
|
<join-column name="object_id" referenced-column-name="id" />
|
||||||
|
</join-columns>
|
||||||
|
<inverse-join-columns>
|
||||||
|
<join-column name="owner_id" referenced-column-name="id" />
|
||||||
|
</inverse-join-columns>
|
||||||
|
</join-table>
|
||||||
|
</many-to-many>
|
||||||
|
<many-to-many field="creators" target-entity="SocialLibrary\BaseBundle\Entity\ObjectCreator">
|
||||||
|
<join-table name="book__creator">
|
||||||
|
<join-columns>
|
||||||
|
<join-column name="object_id" referenced-column-name="id" />
|
||||||
|
</join-columns>
|
||||||
|
<inverse-join-columns>
|
||||||
|
<join-column name="creator_id" referenced-column-name="id" />
|
||||||
|
</inverse-join-columns>
|
||||||
|
</join-table>
|
||||||
|
</many-to-many>
|
||||||
|
</mapped-superclass>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
42
tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Novel.orm.xml
Normal file
42
tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Novel.orm.xml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<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://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
|
||||||
|
|
||||||
|
<entity name="SocialLibrary\ReadBundle\Entity\Novel" table="novel__novel" repository-class="SocialLibrary\ReadBundle\Repository\NovelRepository">
|
||||||
|
<association-overrides>
|
||||||
|
<association-override name="owners">
|
||||||
|
<join-table name="novel__owner">
|
||||||
|
<join-columns>
|
||||||
|
<join-column name="object_id" />
|
||||||
|
</join-columns>
|
||||||
|
<inverse-join-columns>
|
||||||
|
<join-column name="owner_id" />
|
||||||
|
</inverse-join-columns>
|
||||||
|
</join-table>
|
||||||
|
</association-override>
|
||||||
|
<association-override name="creators">
|
||||||
|
<join-table name="novel__creator">
|
||||||
|
<join-columns>
|
||||||
|
<join-column name="object_id" />
|
||||||
|
</join-columns>
|
||||||
|
<inverse-join-columns>
|
||||||
|
<join-column name="creator_id" />
|
||||||
|
</inverse-join-columns>
|
||||||
|
</join-table>
|
||||||
|
</association-override>
|
||||||
|
<association-override name="serie">
|
||||||
|
<join-columns>
|
||||||
|
<join-column name="novel_serie_id" referenced-column-name="id" />
|
||||||
|
</join-columns>
|
||||||
|
</association-override>
|
||||||
|
</association-overrides>
|
||||||
|
|
||||||
|
<attribute-overrides>
|
||||||
|
<attribute-override name="volume">
|
||||||
|
<field column="novel__volume" type="integer" nullable="true" />
|
||||||
|
</attribute-override>
|
||||||
|
</attribute-overrides>
|
||||||
|
</entity>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
Loading…
Reference in New Issue
Block a user