cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [06/11] cayenne git commit: CAY-2176 Java 7 diamond class generation templates
Date Sun, 18 Dec 2016 18:21:07 GMT
http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkDep.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkDep.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkDep.java
index c9e55e2..a73198b 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkDep.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkDep.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.relationships_to_many_fk.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.relationships_to_many_fk.ToManyFkRoot;
 import org.apache.cayenne.testdo.relationships_to_many_fk.ToManyRoot2;
 
@@ -12,43 +13,45 @@ import org.apache.cayenne.testdo.relationships_to_many_fk.ToManyRoot2;
  */
 public abstract class _ToManyFkDep extends CayenneDataObject {
 
-    public static final String DEP_ID_PROPERTY = "depId";
-    public static final String NAME_PROPERTY = "name";
-    public static final String ROOT_PROPERTY = "root";
-    public static final String ROOT2_PROPERTY = "root2";
+    private static final long serialVersionUID = 1L; 
 
     public static final String DEP_ID_PK_COLUMN = "DEP_ID";
     public static final String OTHER_ID_PK_COLUMN = "OTHER_ID";
 
+    public static final Property<Integer> DEP_ID = new Property<>("depId");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<ToManyFkRoot> ROOT = new Property<>("root");
+    public static final Property<ToManyRoot2> ROOT2 = new Property<>("root2");
+
     public void setDepId(Integer depId) {
-        writeProperty(DEP_ID_PROPERTY, depId);
+        writeProperty("depId", depId);
     }
     public Integer getDepId() {
-        return (Integer)readProperty(DEP_ID_PROPERTY);
+        return (Integer)readProperty("depId");
     }
 
     public void setName(String name) {
-        writeProperty(NAME_PROPERTY, name);
+        writeProperty("name", name);
     }
     public String getName() {
-        return (String)readProperty(NAME_PROPERTY);
+        return (String)readProperty("name");
     }
 
     public void setRoot(ToManyFkRoot root) {
-        setToOneTarget(ROOT_PROPERTY, root, true);
+        setToOneTarget("root", root, true);
     }
 
     public ToManyFkRoot getRoot() {
-        return (ToManyFkRoot)readProperty(ROOT_PROPERTY);
+        return (ToManyFkRoot)readProperty("root");
     }
 
 
     public void setRoot2(ToManyRoot2 root2) {
-        setToOneTarget(ROOT2_PROPERTY, root2, true);
+        setToOneTarget("root2", root2, true);
     }
 
     public ToManyRoot2 getRoot2() {
-        return (ToManyRoot2)readProperty(ROOT2_PROPERTY);
+        return (ToManyRoot2)readProperty("root2");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkRoot.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkRoot.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkRoot.java
index 11f5339..a84d75a 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkRoot.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyFkRoot.java
@@ -3,6 +3,7 @@ package org.apache.cayenne.testdo.relationships_to_many_fk.auto;
 import java.util.List;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.relationships_to_many_fk.ToManyFkDep;
 
 /**
@@ -13,35 +14,37 @@ import org.apache.cayenne.testdo.relationships_to_many_fk.ToManyFkDep;
  */
 public abstract class _ToManyFkRoot extends CayenneDataObject {
 
-    public static final String DEP_ID_PROPERTY = "depId";
-    public static final String NAME_PROPERTY = "name";
-    public static final String DEPS_PROPERTY = "deps";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
+    public static final Property<Integer> DEP_ID = new Property<>("depId");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<List<ToManyFkDep>> DEPS = new Property<>("deps");
+
     public void setDepId(Integer depId) {
-        writeProperty(DEP_ID_PROPERTY, depId);
+        writeProperty("depId", depId);
     }
     public Integer getDepId() {
-        return (Integer)readProperty(DEP_ID_PROPERTY);
+        return (Integer)readProperty("depId");
     }
 
     public void setName(String name) {
-        writeProperty(NAME_PROPERTY, name);
+        writeProperty("name", name);
     }
     public String getName() {
-        return (String)readProperty(NAME_PROPERTY);
+        return (String)readProperty("name");
     }
 
     public void addToDeps(ToManyFkDep obj) {
-        addToManyTarget(DEPS_PROPERTY, obj, true);
+        addToManyTarget("deps", obj, true);
     }
     public void removeFromDeps(ToManyFkDep obj) {
-        removeToManyTarget(DEPS_PROPERTY, obj, true);
+        removeToManyTarget("deps", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<ToManyFkDep> getDeps() {
-        return (List<ToManyFkDep>)readProperty(DEPS_PROPERTY);
+        return (List<ToManyFkDep>)readProperty("deps");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyRoot2.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyRoot2.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyRoot2.java
index 418b975..3b1134b 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyRoot2.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_many_fk/auto/_ToManyRoot2.java
@@ -3,6 +3,7 @@ package org.apache.cayenne.testdo.relationships_to_many_fk.auto;
 import java.util.List;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.relationships_to_many_fk.ToManyFkDep;
 
 /**
@@ -13,27 +14,29 @@ import org.apache.cayenne.testdo.relationships_to_many_fk.ToManyFkDep;
  */
 public abstract class _ToManyRoot2 extends CayenneDataObject {
 
-    public static final String NAME_PROPERTY = "name";
-    public static final String DEPS_PROPERTY = "deps";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<List<ToManyFkDep>> DEPS = new Property<>("deps");
+
     public void setName(String name) {
-        writeProperty(NAME_PROPERTY, name);
+        writeProperty("name", name);
     }
     public String getName() {
-        return (String)readProperty(NAME_PROPERTY);
+        return (String)readProperty("name");
     }
 
     public void addToDeps(ToManyFkDep obj) {
-        addToManyTarget(DEPS_PROPERTY, obj, true);
+        addToManyTarget("deps", obj, true);
     }
     public void removeFromDeps(ToManyFkDep obj) {
-        removeToManyTarget(DEPS_PROPERTY, obj, true);
+        removeToManyTarget("deps", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<ToManyFkDep> getDeps() {
-        return (List<ToManyFkDep>)readProperty(DEPS_PROPERTY);
+        return (List<ToManyFkDep>)readProperty("deps");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK1.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK1.java
index 32dfca7..9f7c489 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK1.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.relationships_to_one_fk.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.relationships_to_one_fk.ToOneFK2;
 
 /**
@@ -11,16 +12,18 @@ import org.apache.cayenne.testdo.relationships_to_one_fk.ToOneFK2;
  */
 public abstract class _ToOneFK1 extends CayenneDataObject {
 
-    public static final String TO_PK_PROPERTY = "toPK";
+    private static final long serialVersionUID = 1L; 
 
-    public static final String TO_ONEFK1_PK_PK_COLUMN = "TO_ONEFK1_PK";
+    public static final String TO_ONE_FK1_PK_PK_COLUMN = "TO_ONE_FK1_PK";
+
+    public static final Property<ToOneFK2> TO_PK = new Property<>("toPK");
 
     public void setToPK(ToOneFK2 toPK) {
-        setToOneTarget(TO_PK_PROPERTY, toPK, true);
+        setToOneTarget("toPK", toPK, true);
     }
 
     public ToOneFK2 getToPK() {
-        return (ToOneFK2)readProperty(TO_PK_PROPERTY);
+        return (ToOneFK2)readProperty("toPK");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK2.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK2.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK2.java
index 15fcfdd..4f12594 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK2.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/relationships_to_one_fk/auto/_ToOneFK2.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.relationships_to_one_fk.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.relationships_to_one_fk.ToOneFK1;
 
 /**
@@ -11,16 +12,18 @@ import org.apache.cayenne.testdo.relationships_to_one_fk.ToOneFK1;
  */
 public abstract class _ToOneFK2 extends CayenneDataObject {
 
-    public static final String TO_ONE_TO_FK_PROPERTY = "toOneToFK";
+    private static final long serialVersionUID = 1L; 
 
-    public static final String TO_ONEFK2_PK_PK_COLUMN = "TO_ONEFK2_PK";
+    public static final String TO_ONE_FK2_PK_PK_COLUMN = "TO_ONE_FK2_PK";
+
+    public static final Property<ToOneFK1> TO_ONE_TO_FK = new Property<>("toOneToFK");
 
     public void setToOneToFK(ToOneFK1 toOneToFK) {
-        setToOneTarget(TO_ONE_TO_FK_PROPERTY, toOneToFK, true);
+        setToOneTarget("toOneToFK", toOneToFK, true);
     }
 
     public ToOneFK1 getToOneToFK() {
-        return (ToOneFK1)readProperty(TO_ONE_TO_FK_PROPERTY);
+        return (ToOneFK1)readProperty("toOneToFK");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java
index a126ceb..3a17bf0 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java
@@ -23,7 +23,6 @@ import org.apache.cayenne.access.DataContext;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.relationships_clob.ClobMaster;
@@ -89,11 +88,11 @@ public class CAY_115IT extends ServerCase {
         createDistinctClobFetchDataSet();
 
         SelectQuery noDistinct = new SelectQuery(ClobMaster.class);
-        noDistinct.addOrdering(ClobMaster.NAME_PROPERTY, SortOrder.ASCENDING);
+        noDistinct.addOrdering(ClobMaster.NAME.asc());
 
         SelectQuery distinct = new SelectQuery(ClobMaster.class);
         distinct.setDistinct(true);
-        distinct.addOrdering(ClobMaster.NAME_PROPERTY, SortOrder.ASCENDING);
+        distinct.addOrdering(ClobMaster.NAME.asc());
 
         List<?> noDistinctResult = context.performQuery(noDistinct);
         List<?> distinctResult = context.performQuery(distinct);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/resources/cayenne-relationships-clob.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/cayenne-relationships-clob.xml b/cayenne-server/src/test/resources/cayenne-relationships-clob.xml
index abaa23d..2d736b4 100644
--- a/cayenne-server/src/test/resources/cayenne-relationships-clob.xml
+++ b/cayenne-server/src/test/resources/cayenne-relationships-clob.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <domain project-version="9">
-    <map name="relationships-clob"/>
+	<map name="relationships-clob"/>
 </domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/resources/cayenne-relationships-flattened.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/cayenne-relationships-flattened.xml b/cayenne-server/src/test/resources/cayenne-relationships-flattened.xml
index 1283c12..499333a 100644
--- a/cayenne-server/src/test/resources/cayenne-relationships-flattened.xml
+++ b/cayenne-server/src/test/resources/cayenne-relationships-flattened.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <domain project-version="9">
-    <map name="relationships-flattened"/>
+	<map name="relationships-flattened"/>
 </domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/resources/relationships-clob.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/relationships-clob.map.xml b/cayenne-server/src/test/resources/relationships-clob.map.xml
index 0456088..550b1a5 100644
--- a/cayenne-server/src/test/resources/relationships-clob.map.xml
+++ b/cayenne-server/src/test/resources/relationships-clob.map.xml
@@ -1,32 +1,32 @@
 <?xml version="1.0" encoding="utf-8"?>
 <data-map xmlns="http://cayenne.apache.org/schema/9/modelMap"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd"
-          project-version="9">
-    <property name="defaultPackage" value="org.apache.cayenne.testdo.relationship_clob"/>
-    <db-entity name="CLOB_DETAIL">
-        <db-attribute name="CLOB_DETAIL_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-        <db-attribute name="CLOB_MASTER_ID" type="INTEGER"/>
-        <db-attribute name="NAME" type="VARCHAR" length="254"/>
-    </db-entity>
-    <db-entity name="CLOB_MASTER">
-        <db-attribute name="CLOB_COLUMN" type="CLOB"/>
-        <db-attribute name="CLOB_MASTER_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-        <db-attribute name="NAME" type="VARCHAR" length="254"/>
-    </db-entity>
-    <obj-entity name="ClobDetail" className="org.apache.cayenne.testdo.relationships_clob.ClobDetail"
dbEntityName="CLOB_DETAIL">
-        <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-    </obj-entity>
-    <obj-entity name="ClobMaster" className="org.apache.cayenne.testdo.relationships_clob.ClobMaster"
dbEntityName="CLOB_MASTER">
-        <obj-attribute name="clobColumn" type="java.lang.String" db-attribute-path="CLOB_COLUMN"/>
-        <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-    </obj-entity>
-    <db-relationship name="master" source="CLOB_DETAIL" target="CLOB_MASTER" toMany="false">
-        <db-attribute-pair source="CLOB_MASTER_ID" target="CLOB_MASTER_ID"/>
-    </db-relationship>
-    <db-relationship name="details" source="CLOB_MASTER" target="CLOB_DETAIL" toMany="true">
-        <db-attribute-pair source="CLOB_MASTER_ID" target="CLOB_MASTER_ID"/>
-    </db-relationship>
-    <obj-relationship name="master" source="ClobDetail" target="ClobMaster" db-relationship-path="master"/>
-    <obj-relationship name="details" source="ClobMaster" target="ClobDetail" db-relationship-path="details"/>
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd"
+	 project-version="9">
+	<property name="defaultPackage" value="org.apache.cayenne.testdo.relationships_clob"/>
+	<db-entity name="CLOB_DETAIL">
+		<db-attribute name="CLOB_DETAIL_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="CLOB_MASTER_ID" type="INTEGER"/>
+		<db-attribute name="NAME" type="VARCHAR" length="254"/>
+	</db-entity>
+	<db-entity name="CLOB_MASTER">
+		<db-attribute name="CLOB_COLUMN" type="CLOB"/>
+		<db-attribute name="CLOB_MASTER_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="254"/>
+	</db-entity>
+	<obj-entity name="ClobDetail" className="org.apache.cayenne.testdo.relationships_clob.ClobDetail"
dbEntityName="CLOB_DETAIL">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="ClobMaster" className="org.apache.cayenne.testdo.relationships_clob.ClobMaster"
dbEntityName="CLOB_MASTER">
+		<obj-attribute name="clobColumn" type="java.lang.String" db-attribute-path="CLOB_COLUMN"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<db-relationship name="master" source="CLOB_DETAIL" target="CLOB_MASTER" toMany="false">
+		<db-attribute-pair source="CLOB_MASTER_ID" target="CLOB_MASTER_ID"/>
+	</db-relationship>
+	<db-relationship name="details" source="CLOB_MASTER" target="CLOB_DETAIL" toMany="true">
+		<db-attribute-pair source="CLOB_MASTER_ID" target="CLOB_MASTER_ID"/>
+	</db-relationship>
+	<obj-relationship name="master" source="ClobDetail" target="ClobMaster" db-relationship-path="master"/>
+	<obj-relationship name="details" source="ClobMaster" target="ClobDetail" db-relationship-path="details"/>
 </data-map>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/5042973c/cayenne-server/src/test/resources/relationships-flattened.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/relationships-flattened.map.xml b/cayenne-server/src/test/resources/relationships-flattened.map.xml
index af9364a..cc32c8f 100644
--- a/cayenne-server/src/test/resources/relationships-flattened.map.xml
+++ b/cayenne-server/src/test/resources/relationships-flattened.map.xml
@@ -1,107 +1,107 @@
 <?xml version="1.0" encoding="utf-8"?>
 <data-map xmlns="http://cayenne.apache.org/schema/9/modelMap"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd"
-          project-version="9">
-    <property name="defaultPackage" value="org.apache.cayenne.testdo.relationship_flattened"/>
-    <db-entity name="COMPLEX_JOIN">
-        <db-attribute name="EXTRA_COLUMN" type="VARCHAR" length="50"/>
-        <db-attribute name="FT1_FK" type="INTEGER"/>
-        <db-attribute name="FT3_FK" type="INTEGER"/>
-        <db-attribute name="PK" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-    </db-entity>
-    <db-entity name="FLATTENED_CIRCULAR">
-        <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-    </db-entity>
-    <db-entity name="FLATTENED_CIRCULAR_JOIN">
-        <db-attribute name="SIDE1_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-        <db-attribute name="SIDE2_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-    </db-entity>
-    <db-entity name="FLATTENED_TEST_1">
-        <db-attribute name="FT1_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-        <db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
-    </db-entity>
-    <db-entity name="FLATTENED_TEST_2">
-        <db-attribute name="FT1_ID" type="INTEGER"/>
-        <db-attribute name="FT2_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-        <db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
-    </db-entity>
-    <db-entity name="FLATTENED_TEST_3">
-        <db-attribute name="FT2_ID" type="INTEGER"/>
-        <db-attribute name="FT3_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-        <db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
-    </db-entity>
-    <db-entity name="FLATTENED_TEST_4">
-        <db-attribute name="FT3_ID" type="INTEGER"/>
-        <db-attribute name="FT4_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-        <db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
-    </db-entity>
-    <obj-entity name="FlattenedCircular" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedCircular"
dbEntityName="FLATTENED_CIRCULAR">
-    </obj-entity>
-    <obj-entity name="FlattenedTest1" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedTest1"
dbEntityName="FLATTENED_TEST_1">
-        <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-    </obj-entity>
-    <obj-entity name="FlattenedTest2" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedTest2"
dbEntityName="FLATTENED_TEST_2">
-        <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-    </obj-entity>
-    <obj-entity name="FlattenedTest3" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedTest3"
dbEntityName="FLATTENED_TEST_3">
-        <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-    </obj-entity>
-    <obj-entity name="FlattenedTest4" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedTest4"
dbEntityName="FLATTENED_TEST_4">
-        <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-    </obj-entity>
-    <db-relationship name="toFT1" source="COMPLEX_JOIN" target="FLATTENED_TEST_1" toMany="false">
-        <db-attribute-pair source="FT1_FK" target="FT1_ID"/>
-    </db-relationship>
-    <db-relationship name="toFT3" source="COMPLEX_JOIN" target="FLATTENED_TEST_3" toMany="false">
-        <db-attribute-pair source="FT3_FK" target="FT3_ID"/>
-    </db-relationship>
-    <db-relationship name="side1s" source="FLATTENED_CIRCULAR" target="FLATTENED_CIRCULAR_JOIN"
toDependentPK="true" toMany="true">
-        <db-attribute-pair source="ID" target="SIDE2_ID"/>
-    </db-relationship>
-    <db-relationship name="side2s" source="FLATTENED_CIRCULAR" target="FLATTENED_CIRCULAR_JOIN"
toDependentPK="true" toMany="true">
-        <db-attribute-pair source="ID" target="SIDE1_ID"/>
-    </db-relationship>
-    <db-relationship name="side1" source="FLATTENED_CIRCULAR_JOIN" target="FLATTENED_CIRCULAR"
toMany="false">
-        <db-attribute-pair source="SIDE1_ID" target="ID"/>
-    </db-relationship>
-    <db-relationship name="side2" source="FLATTENED_CIRCULAR_JOIN" target="FLATTENED_CIRCULAR"
toMany="false">
-        <db-attribute-pair source="SIDE2_ID" target="ID"/>
-    </db-relationship>
-    <db-relationship name="complexJoins" source="FLATTENED_TEST_1" target="COMPLEX_JOIN"
toMany="true">
-        <db-attribute-pair source="FT1_ID" target="FT1_FK"/>
-    </db-relationship>
-    <db-relationship name="ft2Array" source="FLATTENED_TEST_1" target="FLATTENED_TEST_2"
toMany="true">
-        <db-attribute-pair source="FT1_ID" target="FT1_ID"/>
-    </db-relationship>
-    <db-relationship name="ft3Array" source="FLATTENED_TEST_2" target="FLATTENED_TEST_3"
toMany="true">
-        <db-attribute-pair source="FT2_ID" target="FT2_ID"/>
-    </db-relationship>
-    <db-relationship name="toFT1" source="FLATTENED_TEST_2" target="FLATTENED_TEST_1"
toMany="false">
-        <db-attribute-pair source="FT1_ID" target="FT1_ID"/>
-    </db-relationship>
-    <db-relationship name="complexJoins" source="FLATTENED_TEST_3" target="COMPLEX_JOIN"
toMany="true">
-        <db-attribute-pair source="FT3_ID" target="FT3_FK"/>
-    </db-relationship>
-    <db-relationship name="ft4Array" source="FLATTENED_TEST_3" target="FLATTENED_TEST_4"
toMany="true">
-        <db-attribute-pair source="FT3_ID" target="FT3_ID"/>
-    </db-relationship>
-    <db-relationship name="toFT2" source="FLATTENED_TEST_3" target="FLATTENED_TEST_2"
toMany="false">
-        <db-attribute-pair source="FT2_ID" target="FT2_ID"/>
-    </db-relationship>
-    <db-relationship name="toFT3" source="FLATTENED_TEST_4" target="FLATTENED_TEST_3"
toMany="false">
-        <db-attribute-pair source="FT3_ID" target="FT3_ID"/>
-    </db-relationship>
-    <obj-relationship name="side1s" source="FlattenedCircular" target="FlattenedCircular"
db-relationship-path="side1s.side1"/>
-    <obj-relationship name="side2s" source="FlattenedCircular" target="FlattenedCircular"
db-relationship-path="side2s.side2"/>
-    <obj-relationship name="ft2Array" source="FlattenedTest1" target="FlattenedTest2"
db-relationship-path="ft2Array"/>
-    <obj-relationship name="ft3Array" source="FlattenedTest1" target="FlattenedTest3"
db-relationship-path="ft2Array.ft3Array"/>
-    <obj-relationship name="ft3OverComplex" source="FlattenedTest1" target="FlattenedTest3"
db-relationship-path="complexJoins.toFT3"/>
-    <obj-relationship name="ft4ArrayFor1" source="FlattenedTest1" target="FlattenedTest4"
db-relationship-path="ft2Array.ft3Array.ft4Array"/>
-    <obj-relationship name="ft3Array" source="FlattenedTest2" target="FlattenedTest3"
db-relationship-path="ft3Array"/>
-    <obj-relationship name="toFT1" source="FlattenedTest2" target="FlattenedTest1" db-relationship-path="toFT1"/>
-    <obj-relationship name="ft4Array" source="FlattenedTest3" target="FlattenedTest4"
db-relationship-path="ft4Array"/>
-    <obj-relationship name="toFT1" source="FlattenedTest3" target="FlattenedTest1" db-relationship-path="toFT2.toFT1"/>
-    <obj-relationship name="toFT2" source="FlattenedTest3" target="FlattenedTest2" db-relationship-path="toFT2"/>
-    <obj-relationship name="toFT3" source="FlattenedTest4" target="FlattenedTest3" db-relationship-path="toFT3"/>
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd"
+	 project-version="9">
+	<property name="defaultPackage" value="org.apache.cayenne.testdo.relationships_flattened"/>
+	<db-entity name="COMPLEX_JOIN">
+		<db-attribute name="EXTRA_COLUMN" type="VARCHAR" length="50"/>
+		<db-attribute name="FT1_FK" type="INTEGER"/>
+		<db-attribute name="FT3_FK" type="INTEGER"/>
+		<db-attribute name="PK" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="FLATTENED_CIRCULAR">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="FLATTENED_CIRCULAR_JOIN">
+		<db-attribute name="SIDE1_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="SIDE2_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="FLATTENED_TEST_1">
+		<db-attribute name="FT1_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="FLATTENED_TEST_2">
+		<db-attribute name="FT1_ID" type="INTEGER"/>
+		<db-attribute name="FT2_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="FLATTENED_TEST_3">
+		<db-attribute name="FT2_ID" type="INTEGER"/>
+		<db-attribute name="FT3_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="FLATTENED_TEST_4">
+		<db-attribute name="FT3_ID" type="INTEGER"/>
+		<db-attribute name="FT4_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<obj-entity name="FlattenedCircular" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedCircular"
dbEntityName="FLATTENED_CIRCULAR">
+	</obj-entity>
+	<obj-entity name="FlattenedTest1" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedTest1"
dbEntityName="FLATTENED_TEST_1">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="FlattenedTest2" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedTest2"
dbEntityName="FLATTENED_TEST_2">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="FlattenedTest3" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedTest3"
dbEntityName="FLATTENED_TEST_3">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="FlattenedTest4" className="org.apache.cayenne.testdo.relationships_flattened.FlattenedTest4"
dbEntityName="FLATTENED_TEST_4">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<db-relationship name="toFT1" source="COMPLEX_JOIN" target="FLATTENED_TEST_1" toMany="false">
+		<db-attribute-pair source="FT1_FK" target="FT1_ID"/>
+	</db-relationship>
+	<db-relationship name="toFT3" source="COMPLEX_JOIN" target="FLATTENED_TEST_3" toMany="false">
+		<db-attribute-pair source="FT3_FK" target="FT3_ID"/>
+	</db-relationship>
+	<db-relationship name="side1s" source="FLATTENED_CIRCULAR" target="FLATTENED_CIRCULAR_JOIN"
toDependentPK="true" toMany="true">
+		<db-attribute-pair source="ID" target="SIDE2_ID"/>
+	</db-relationship>
+	<db-relationship name="side2s" source="FLATTENED_CIRCULAR" target="FLATTENED_CIRCULAR_JOIN"
toDependentPK="true" toMany="true">
+		<db-attribute-pair source="ID" target="SIDE1_ID"/>
+	</db-relationship>
+	<db-relationship name="side1" source="FLATTENED_CIRCULAR_JOIN" target="FLATTENED_CIRCULAR"
toMany="false">
+		<db-attribute-pair source="SIDE1_ID" target="ID"/>
+	</db-relationship>
+	<db-relationship name="side2" source="FLATTENED_CIRCULAR_JOIN" target="FLATTENED_CIRCULAR"
toMany="false">
+		<db-attribute-pair source="SIDE2_ID" target="ID"/>
+	</db-relationship>
+	<db-relationship name="complexJoins" source="FLATTENED_TEST_1" target="COMPLEX_JOIN"
toMany="true">
+		<db-attribute-pair source="FT1_ID" target="FT1_FK"/>
+	</db-relationship>
+	<db-relationship name="ft2Array" source="FLATTENED_TEST_1" target="FLATTENED_TEST_2"
toMany="true">
+		<db-attribute-pair source="FT1_ID" target="FT1_ID"/>
+	</db-relationship>
+	<db-relationship name="ft3Array" source="FLATTENED_TEST_2" target="FLATTENED_TEST_3"
toMany="true">
+		<db-attribute-pair source="FT2_ID" target="FT2_ID"/>
+	</db-relationship>
+	<db-relationship name="toFT1" source="FLATTENED_TEST_2" target="FLATTENED_TEST_1" toMany="false">
+		<db-attribute-pair source="FT1_ID" target="FT1_ID"/>
+	</db-relationship>
+	<db-relationship name="complexJoins" source="FLATTENED_TEST_3" target="COMPLEX_JOIN"
toMany="true">
+		<db-attribute-pair source="FT3_ID" target="FT3_FK"/>
+	</db-relationship>
+	<db-relationship name="ft4Array" source="FLATTENED_TEST_3" target="FLATTENED_TEST_4"
toMany="true">
+		<db-attribute-pair source="FT3_ID" target="FT3_ID"/>
+	</db-relationship>
+	<db-relationship name="toFT2" source="FLATTENED_TEST_3" target="FLATTENED_TEST_2" toMany="false">
+		<db-attribute-pair source="FT2_ID" target="FT2_ID"/>
+	</db-relationship>
+	<db-relationship name="toFT3" source="FLATTENED_TEST_4" target="FLATTENED_TEST_3" toMany="false">
+		<db-attribute-pair source="FT3_ID" target="FT3_ID"/>
+	</db-relationship>
+	<obj-relationship name="side1s" source="FlattenedCircular" target="FlattenedCircular"
db-relationship-path="side1s.side1"/>
+	<obj-relationship name="side2s" source="FlattenedCircular" target="FlattenedCircular"
db-relationship-path="side2s.side2"/>
+	<obj-relationship name="ft2Array" source="FlattenedTest1" target="FlattenedTest2" db-relationship-path="ft2Array"/>
+	<obj-relationship name="ft3Array" source="FlattenedTest1" target="FlattenedTest3" db-relationship-path="ft2Array.ft3Array"/>
+	<obj-relationship name="ft3OverComplex" source="FlattenedTest1" target="FlattenedTest3"
db-relationship-path="complexJoins.toFT3"/>
+	<obj-relationship name="ft4ArrayFor1" source="FlattenedTest1" target="FlattenedTest4"
db-relationship-path="ft2Array.ft3Array.ft4Array"/>
+	<obj-relationship name="ft3Array" source="FlattenedTest2" target="FlattenedTest3" db-relationship-path="ft3Array"/>
+	<obj-relationship name="toFT1" source="FlattenedTest2" target="FlattenedTest1" db-relationship-path="toFT1"/>
+	<obj-relationship name="ft4Array" source="FlattenedTest3" target="FlattenedTest4" db-relationship-path="ft4Array"/>
+	<obj-relationship name="toFT1" source="FlattenedTest3" target="FlattenedTest1" db-relationship-path="toFT2.toFT1"/>
+	<obj-relationship name="toFT2" source="FlattenedTest3" target="FlattenedTest2" db-relationship-path="toFT2"/>
+	<obj-relationship name="toFT3" source="FlattenedTest4" target="FlattenedTest3" db-relationship-path="toFT3"/>
 </data-map>


Mime
View raw message