File: DDC2429Book.orm.xml

package info (click to toggle)
doctrine 3.3.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 11,236 kB
  • sloc: php: 105,633; xml: 1,312; makefile: 35; sh: 14
file content (40 lines) | stat: -rw-r--r-- 2,187 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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://www.doctrine-project.org/schemas/orm/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>