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
34 lines (32 loc) • 2.02 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\EstimateLine" table="estimate_line">
<id name="estimateLineId" type="integer" column="estimate_line_id">
<generator strategy="IDENTITY"/>
</id>
<field name="name" type="string" column="name" length="255" nullable="true"/>
<field name="description" type="string" column="description" length="255" nullable="true"/>
<field name="unitCost" type="float" column="unit_cost" precision="10" scale="0" nullable="false"/>
<field name="quantity" type="integer" column="quantity" nullable="false"/>
<field name="tax1Name" type="string" column="tax1_name" length="255" nullable="true"/>
<field name="tax2Name" type="string" column="tax2_name" length="255" nullable="true"/>
<field name="tax2Percent" type="string" column="tax2_percent" length="255" nullable="true"/>
<field name="tax1Percent" type="string" column="tax1_percent" length="255" nullable="true"/>
<field name="type" type="string" column="type" length="255" nullable="true"/>
<many-to-one field="tax1" target-entity="Db\Entity\Tax" fetch="LAZY">
<join-columns>
<join-column name="tax1_id" referenced-column-name="tax_id"/>
</join-columns>
</many-to-one>
<many-to-one field="tax2" target-entity="Db\Entity\Tax" fetch="LAZY">
<join-columns>
<join-column name="tax2_id" referenced-column-name="tax_id"/>
</join-columns>
</many-to-one>
<many-to-one field="estimate" target-entity="Db\Entity\Estimate" inversed-by="estimateLines">
<join-columns>
<join-column name="estimate_id" referenced-column-name="id" nullable="false"/>
</join-columns>
</many-to-one>
</entity>
</doctrine-mapping>