grunt-doctrine
Version:
Grunt plugin to convert doctrine xml annotations into backbone models and collections. Useful in conjunction with doctrine apigility. Includes option to scaffold an entire BBB application
25 lines (21 loc) • 1.24 kB
text/xml
<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 http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Db\Entity\Contact" table="contact">
<indexes>
<index name="client_id" columns="client_id"/>
</indexes>
<id name="contactId" type="integer" column="id">
<generator strategy="IDENTITY"/>
</id>
<field name="firstName" type="string" column="first_name" length="255" nullable="true"/>
<field name="lastName" type="string" column="last_name" length="255" nullable="true"/>
<field name="email" type="string" column="email" length="255" nullable="true"/>
<field name="phone1" type="string" column="phone1" length="255" nullable="true"/>
<field name="phone2" type="string" column="phone2" length="255" nullable="true"/>
<many-to-one field="client" target-entity="Db\Entity\Client" fetch="LAZY">
<join-columns>
<join-column name="client_id" referenced-column-name="id"/>
</join-columns>
</many-to-one>
</entity>
</doctrine-mapping>