File: Doctrine.Tests.ORM.Mapping.UserIncorrectAttributes.dcm.xml

package info (click to toggle)
doctrine 2.14.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,612 kB
  • sloc: php: 113,660; xml: 4,630; makefile: 28; sh: 14
file content (65 lines) | stat: -rw-r--r-- 2,820 bytes parent folder | download
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?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">

    <entity name="Doctrine\Tests\ORM\Mapping\UserIncorrectAttributes" table="cms_users">
        <unique-constraints>
            <unique-constraint columns="name,user_email" name="search_idx">
                <options>
                    <option name="where">name IS NOT NULL</option>
                </options>
            </unique-constraint>
            <unique-constraint columns="" fields="name,phone" name="phone_idx"/>
        </unique-constraints>

        <lifecycle-callbacks>
            <lifecycle-callback type="prePersist" method="doStuffOnPrePersist"/>
            <lifecycle-callback type="prePersist" method="doOtherStuffOnPrePersistToo"/>
            <lifecycle-callback type="postPersist" method="doStuffOnPostPersist"/>
        </lifecycle-callbacks>

        <named-queries>
            <named-query name="all" query="SELECT u FROM __CLASS__ u"/>
        </named-queries>

        <id name="id" type="integer" column="id">
            <generator strategy="AUTO"/>
            <sequence-generator sequence-name="tablename_seq" allocation-size="100" initial-value="1" />
            <options>
                <option name="foo">bar</option>
                <option name="unsigned">false</option>
            </options>
        </id>

        <field field="name" column="name" type="string" length="50" nullable="true" unique="true">
            <options>
                <option name="foo">bar</option>
                <option name="baz">
                    <option name="key">val</option>
                </option>
                <option name="fixed">false</option>
            </options>
        </field>
        <field field="email" column="user_email" type="string" column-definition="CHAR(32) NOT NULL" />

        <field name="version" type="integer" version="true" />

        <many-to-many fieldName="groups" target-entity="Group">
            <cascade>
                <cascade-all/>
            </cascade>
            <join-table name="cms_users_groups">
                <join-columns>
                    <join-column name="user_id" referenced-column-name="id" nullable="false" unique="false" />
                </join-columns>
                <inverse-join-columns>
                    <join-column name="group_id" referenced-column-name="id" column-definition="INT NULL" />
                </inverse-join-columns>
            </join-table>
        </many-to-many>
    </entity>

</doctrine-mapping>