Mapping.Fixture.Xml.NestedTree.dcm.xml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
  3. xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
  4. <entity name="Mapping\Fixture\Xml\NestedTree" table="nested_trees">
  5. <indexes>
  6. <index name="name_idx" columns="name"/>
  7. </indexes>
  8. <id name="id" type="integer" column="id">
  9. <generator strategy="AUTO"/>
  10. </id>
  11. <field name="name" type="string" length="128"/>
  12. <field name="left" column="lft" type="integer">
  13. <gedmo:tree-left/>
  14. </field>
  15. <field name="right" column="rgt" type="integer">
  16. <gedmo:tree-right/>
  17. </field>
  18. <field name="root" type="integer">
  19. <gedmo:tree-root/>
  20. </field>
  21. <field name="level" column="lvl" type="integer">
  22. <gedmo:tree-level/>
  23. </field>
  24. <many-to-one field="parent" target-entity="NestedTree">
  25. <join-column name="parent_id" referenced-column-name="id" on-delete="CASCADE"/>
  26. <gedmo:tree-parent/>
  27. </many-to-one>
  28. <gedmo:tree type="nested"/>
  29. </entity>
  30. </doctrine-mapping>