2009-06-01 20:14:11 +04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
2009-08-13 14:13:06 +04:00
|
|
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
|
2009-06-01 20:14:11 +04:00
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
2009-08-13 14:13:06 +04:00
|
|
|
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
|
2009-06-01 20:14:11 +04:00
|
|
|
/Users/robo/dev/php/Doctrine/doctrine-mapping.xsd">
|
|
|
|
|
2009-08-13 15:03:26 +04:00
|
|
|
<entity name="Doctrine\Tests\ORM\Mapping\User" table="cms_users">
|
2009-06-01 20:14:11 +04:00
|
|
|
|
2009-08-14 15:04:31 +04:00
|
|
|
<lifecycle-callbacks>
|
|
|
|
<lifecycle-callback type="prePersist" method="onPrePersist" />
|
|
|
|
</lifecycle-callbacks>
|
|
|
|
|
2009-06-01 20:14:11 +04:00
|
|
|
<id name="id" type="integer" column="id">
|
2009-06-07 21:20:37 +04:00
|
|
|
<generator strategy="AUTO"/>
|
2009-06-01 20:14:11 +04:00
|
|
|
</id>
|
|
|
|
|
|
|
|
<field name="name" column="name" type="string" length="50"/>
|
|
|
|
|
2009-08-21 22:13:22 +04:00
|
|
|
<one-to-one field="address" target-entity="Address">
|
|
|
|
<join-column name="address_id" referenced-column-name="id"/>
|
2009-06-01 20:14:11 +04:00
|
|
|
</one-to-one>
|
|
|
|
|
2009-08-21 22:13:22 +04:00
|
|
|
<one-to-many field="phonenumbers" target-entity="Phonenumber" mapped-by="user">
|
2009-06-01 20:14:11 +04:00
|
|
|
<cascade>
|
2009-07-25 20:33:29 +04:00
|
|
|
<cascade-persist/>
|
2009-06-01 20:14:11 +04:00
|
|
|
</cascade>
|
|
|
|
</one-to-many>
|
|
|
|
|
2009-08-21 22:13:22 +04:00
|
|
|
<many-to-many field="groups" target-entity="Group">
|
2009-06-01 20:14:11 +04:00
|
|
|
<join-table name="cms_users_groups">
|
|
|
|
<join-columns>
|
2009-08-21 22:13:22 +04:00
|
|
|
<join-column name="user_id" referenced-column-name="id"/>
|
2009-06-01 20:14:11 +04:00
|
|
|
</join-columns>
|
|
|
|
<inverse-join-columns>
|
2009-08-21 22:13:22 +04:00
|
|
|
<join-column name="group_id" referenced-column-name="id"/>
|
2009-06-01 20:14:11 +04:00
|
|
|
</inverse-join-columns>
|
|
|
|
</join-table>
|
|
|
|
</many-to-many>
|
|
|
|
|
|
|
|
</entity>
|
|
|
|
|
2009-06-06 01:40:47 +04:00
|
|
|
</doctrine-mapping>
|