]> Raphaƫl G. Git Repositories - airbundle/blob - config/doctrine/Country.orm.xml
Version 0.6.0
[airbundle] / config / doctrine / Country.orm.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <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">
3 <entity name="Rapsys\AirBundle\Entity\Country" table="countries">
4 <id name="id" type="integer">
5 <generator strategy="AUTO" />
6 <options>
7 <option name="unsigned">true</option>
8 </options>
9 </id>
10 <field name="code" type="string" length="2" nullable="false" />
11 <field name="alpha" type="string" length="3" nullable="false" />
12 <field name="title" type="string" length="64" nullable="false" />
13 <field name="created" type="datetime" />
14 <field name="updated" type="datetime" />
15 <one-to-many field="users" target-entity="Rapsys\AirBundle\Entity\User" mapped-by="country" fetch="LAZY" />
16 <unique-constraints>
17 <unique-constraint name="code" columns="code" />
18 <unique-constraint name="alpha" columns="alpha" />
19 </unique-constraints>
20 <lifecycle-callbacks>
21 <lifecycle-callback type="preUpdate" method="preUpdate" />
22 </lifecycle-callbacks>
23 </entity>
24 </doctrine-mapping>