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
35 lines (32 loc) • 1.79 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\Client" table="client">
<indexes>
<index name="currency_code" columns="currency_code"/>
</indexes>
<id name="clientId" type="integer" column="id">
<generator strategy="IDENTITY"/>
</id>
<field name="First Name" type="string" column="first_name" length="255" nullable="true"/>
<field name="Last Name" type="string" column="last_name" length="255" nullable="true"/>
<field name="Organization" type="string" column="organization" length="255" nullable="true"/>
<field name="Email" type="string" column="email" length="255" nullable="true"/>
<field name="Vat Name" type="string" column="vat_name" length="255" nullable="true"/>
<field name="Vat Number" type="string" column="vat_number" length="255" nullable="true"/>
<many-to-one field="currency" target-entity="Db\Entity\Currency" fetch="EAGER">
<join-columns>
<join-column name="currency_code" referenced-column-name="id"/>
</join-columns>
</many-to-one>
<many-to-one field="country" target-entity="Db\Entity\Country" fetch="EAGER">
<join-columns>
<join-column name="country_code" referenced-column-name="id"/>
</join-columns>
</many-to-one>
<many-to-one field="language" target-entity="Db\Entity\Language" fetch="EAGER">
<join-columns>
<join-column name="language_code" referenced-column-name="id"/>
</join-columns>
</many-to-one>
</entity>
</doctrine-mapping>