2009-06-01 20:14:11 +04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
<doctrine-mapping xmlns="http://schemas.doctrine-project.org/orm/doctrine-mapping"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
xsi:schemaLocation="http://schemas.doctrine-project.org/orm/doctrine-mapping
|
|
|
|
/Users/robo/dev/php/Doctrine/doctrine-mapping.xsd">
|
|
|
|
|
|
|
|
<entity name="XmlMappingTest\User" table="cms_users">
|
|
|
|
|
|
|
|
<id name="id" type="integer" column="id">
|
|
|
|
<generator strategy="auto"/>
|
|
|
|
</id>
|
|
|
|
|
|
|
|
<field name="name" column="name" type="string" length="50"/>
|
|
|
|
|
|
|
|
<one-to-one field="address" targetEntity="Address">
|
|
|
|
<join-column name="address_id" referencedColumnName="id"/>
|
|
|
|
</one-to-one>
|
|
|
|
|
|
|
|
<one-to-many field="phonenumbers" targetEntity="Phonenumber" mappedBy="user">
|
|
|
|
<cascade>
|
|
|
|
<cascade-save/>
|
|
|
|
</cascade>
|
|
|
|
</one-to-many>
|
|
|
|
|
|
|
|
<many-to-many field="groups" targetEntity="Group">
|
|
|
|
<join-table name="cms_users_groups">
|
|
|
|
<join-columns>
|
|
|
|
<join-column name="user_id" referencedColumnName="id"/>
|
|
|
|
</join-columns>
|
|
|
|
<inverse-join-columns>
|
|
|
|
<join-column name="group_id" referencedColumnName="id"/>
|
|
|
|
</inverse-join-columns>
|
|
|
|
</join-table>
|
|
|
|
</many-to-many>
|
|
|
|
|
|
|
|
|
|
|
|
</entity>
|
|
|
|
|
2009-06-06 01:40:47 +04:00
|
|
|
</doctrine-mapping>
|