cayenne-bigint-test/model/src/main/resources/test/test.map.xml

41 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<data-map xmlns="http://cayenne.apache.org/schema/10/modelMap"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://cayenne.apache.org/schema/10/modelMap https://cayenne.apache.org/schema/10/modelMap.xsd"
project-version="10">
<property name="defaultPackage" value="test.cayenne"/>
<property name="defaultCatalog" value="test"/>
<db-entity name="e1" catalog="test">
<db-attribute name="e2_id" type="BIGINT" length="10"/>
<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isGenerated="true" isMandatory="true" length="10"/>
<db-attribute name="text" type="LONGVARCHAR" length="65535"/>
</db-entity>
<db-entity name="e2" catalog="test">
<db-attribute name="e1_id" type="BIGINT" length="10"/>
<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isGenerated="true" isMandatory="true" length="10"/>
<db-attribute name="text" type="LONGVARCHAR" length="65535"/>
</db-entity>
<obj-entity name="E1" className="test.cayenne.E1" dbEntityName="e1">
<obj-attribute name="text" type="java.lang.String" db-attribute-path="text"/>
</obj-entity>
<obj-entity name="E2" className="test.cayenne.E2" dbEntityName="e2">
<obj-attribute name="text" type="java.lang.String" db-attribute-path="text"/>
</obj-entity>
<db-relationship name="e2" source="e1" target="e2">
<db-attribute-pair source="e2_id" target="id"/>
</db-relationship>
<db-relationship name="e2s" source="e1" target="e2" toMany="true">
<db-attribute-pair source="id" target="e1_id"/>
</db-relationship>
<db-relationship name="e1" source="e2" target="e1">
<db-attribute-pair source="e1_id" target="id"/>
</db-relationship>
<db-relationship name="e1s" source="e2" target="e1" toMany="true">
<db-attribute-pair source="id" target="e2_id"/>
</db-relationship>
<obj-relationship name="e2" source="E1" target="E2" deleteRule="Nullify" db-relationship-path="e2"/>
<obj-relationship name="e2s" source="E1" target="E2" deleteRule="Deny" db-relationship-path="e2s"/>
<obj-relationship name="e1" source="E2" target="E1" deleteRule="Nullify" db-relationship-path="e1"/>
<obj-relationship name="e1s" source="E2" target="E1" deleteRule="Deny" db-relationship-path="e1s"/>
</data-map>