-
Notifications
You must be signed in to change notification settings - Fork 340
/
Copy pathCollection.orm.xml
53 lines (47 loc) · 2.67 KB
/
Collection.orm.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="utf-8"?>
<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"
xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
<entity name="Sulu\Bundle\MediaBundle\Entity\Collection" table="me_collections" repository-class="Sulu\Bundle\MediaBundle\Entity\CollectionRepository">
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
<field name="style" type="string" column="style" length="255" nullable="true"/>
<field name="lft" type="integer" column="lft">
<gedmo:tree-left/>
</field>
<field name="rgt" type="integer" column="rgt">
<gedmo:tree-right/>
</field>
<field name="depth" type="integer" column="depth">
<gedmo:tree-level/>
</field>
<field name="key" type="string" column="collection_key" length="191" unique="true" nullable="true"/>
<many-to-one field="type" target-entity="Sulu\Bundle\MediaBundle\Entity\CollectionType" inversed-by="collections">
<join-columns>
<join-column name="idCollectionTypes" referenced-column-name="id" nullable="false"/>
</join-columns>
</many-to-one>
<one-to-one field="defaultMeta" target-entity="Sulu\Bundle\MediaBundle\Entity\CollectionMeta">
<cascade>
<cascade-all />
</cascade>
<join-column name="idCollectionsMetaDefault" referenced-column-name="id" nullable="true" on-delete="CASCADE" />
</one-to-one>
<one-to-many field="meta" target-entity="Sulu\Bundle\MediaBundle\Entity\CollectionMeta" mapped-by="collection">
<cascade>
<cascade-persist />
</cascade>
</one-to-many>
<one-to-many field="media" target-entity="Sulu\Bundle\MediaBundle\Entity\MediaInterface" mapped-by="collection"/>
<one-to-many field="children" target-entity="Sulu\Bundle\MediaBundle\Entity\CollectionInterface" mapped-by="parent"/>
<many-to-one field="parent" target-entity="Sulu\Bundle\MediaBundle\Entity\Collection" inversed-by="children">
<join-columns>
<join-column name="idCollectionsParent" referenced-column-name="id" on-delete="SET NULL" />
</join-columns>
<gedmo:tree-parent/>
</many-to-one>
<gedmo:tree type="nested"/>
</entity>
</doctrine-mapping>