cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [03/11] cayenne git commit: CAY-2176 Java 7 diamond class generation templates
Date Sun, 18 Dec 2016 18:21:04 GMT
CAY-2176 Java 7 diamond class generation templates

* regenerated unit tests with the new templates and no String properties
* cleaned up String property refs in unit tests


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/48a35028
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/48a35028
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/48a35028

Branch: refs/heads/master
Commit: 48a350282612d0ae9769fb11a86f938a89a0c0c6
Parents: bb981ae
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Sun Dec 18 19:18:18 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Sun Dec 18 20:23:28 2016 +0300

----------------------------------------------------------------------
 .../DataContextExtendedTypeOperationsIT.java    |  9 ++---
 .../org/apache/cayenne/access/EmbeddingIT.java  | 17 ++++-----
 .../java/org/apache/cayenne/access/EnumIT.java  |  5 +--
 .../access/SingleTableInheritance1IT.java       |  2 +-
 .../testdo/date_time/auto/_CalendarEntity.java  |  5 +--
 .../testdo/date_time/auto/_DateTestEntity.java  | 13 ++-----
 .../testdo/deleterules/auto/_DeleteCascade.java | 15 ++++----
 .../testdo/deleterules/auto/_DeleteDeny.java    | 15 ++++----
 .../testdo/deleterules/auto/_DeleteNullify.java | 15 ++++----
 .../testdo/deleterules/auto/_DeleteRule.java    | 37 +++++++++++---------
 .../testdo/embeddable/auto/_EmbedEntity1.java   | 21 ++++++-----
 .../testdo/embeddable/auto/_Embeddable1.java    |  5 +--
 .../testdo/enum_test/auto/_EnumEntity.java      |  5 +--
 .../extended_type/auto/_ExtendedTypeEntity.java |  5 +--
 .../generated/auto/_GeneratedColumnCompKey.java |  9 ++---
 .../auto/_GeneratedColumnCompMaster.java        |  9 ++---
 .../generated/auto/_GeneratedColumnDep.java     |  9 ++---
 .../generated/auto/_GeneratedColumnTest2.java   |  5 +--
 .../auto/_GeneratedColumnTestEntity.java        |  9 ++---
 .../testdo/generated/auto/_GeneratedF1.java     |  5 +--
 .../testdo/generated/auto/_GeneratedF2.java     |  5 +--
 .../testdo/inheritance/auto/_BaseEntity.java    | 21 ++++++-----
 .../inheritance/auto/_DirectToSubEntity.java    | 15 ++++----
 .../testdo/inheritance/auto/_RelatedEntity.java | 23 ++++++------
 .../testdo/inheritance/auto/_SubEntity.java     |  2 ++
 .../testdo/inheritance_flat/auto/_Group.java    | 17 +++++----
 .../inheritance_flat/auto/_GroupProperties.java | 21 ++++++-----
 .../testdo/inheritance_flat/auto/_Role.java     | 29 ++++++++-------
 .../testdo/inheritance_flat/auto/_User.java     |  9 +++--
 .../inheritance_flat/auto/_UserProperties.java  | 21 ++++++-----
 .../testdo/inheritance_vertical/IvSub3.java     |  7 ++--
 .../inheritance_vertical/auto/_Iv1Root.java     |  4 +--
 .../inheritance_vertical/auto/_Iv1Sub1.java     |  2 +-
 .../inheritance_vertical/auto/_Iv2Root.java     |  2 +-
 .../inheritance_vertical/auto/_Iv2Sub1.java     |  2 +-
 .../inheritance_vertical/auto/_IvAbstract.java  |  2 +-
 .../inheritance_vertical/auto/_IvBase.java      | 20 +++++------
 .../inheritance_vertical/auto/_IvConcrete.java  |  6 ++--
 .../inheritance_vertical/auto/_IvImpl.java      |  6 ++--
 .../inheritance_vertical/auto/_IvOther.java     | 11 +++---
 .../inheritance_vertical/auto/_IvRoot.java      |  4 +--
 .../inheritance_vertical/auto/_IvSub1.java      |  2 +-
 .../inheritance_vertical/auto/_IvSub1Sub1.java  |  2 +-
 .../inheritance_vertical/auto/_IvSub2.java      |  4 +--
 .../inheritance_vertical/auto/_IvSub3.java      |  6 +---
 .../auto/_Lifecycle.java                        |  2 +-
 .../src/test/resources/cayenne-enum.xml         |  2 +-
 cayenne-server/src/test/resources/enum.map.xml  | 30 ++++++++--------
 48 files changed, 236 insertions(+), 256 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextExtendedTypeOperationsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextExtendedTypeOperationsIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextExtendedTypeOperationsIT.java
index ee041cf..89ef0ca 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextExtendedTypeOperationsIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextExtendedTypeOperationsIT.java
@@ -21,7 +21,6 @@ package org.apache.cayenne.access;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.exp.Expression;
-import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.query.CapsStrategy;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
@@ -69,10 +68,7 @@ public class DataContextExtendedTypeOperationsIT extends ServerCase {
 
         e1.getObjectContext().commitChanges();
 
-        Expression in = ExpressionFactory.inExp(
-                ExtendedTypeEntity.NAME_PROPERTY,
-                new StringET1("X"),
-                new StringET1("Y"));
+        Expression in = ExtendedTypeEntity.NAME.in(new StringET1("X"), new StringET1("Y"));
         SelectQuery query = new SelectQuery(ExtendedTypeEntity.class, in);
         assertEquals(2, e1.getObjectContext().performQuery(query).size());
     }
@@ -90,8 +86,7 @@ public class DataContextExtendedTypeOperationsIT extends ServerCase {
 
         e1.getObjectContext().commitChanges();
 
-        Expression in = ExpressionFactory.inExp(ExtendedTypeEntity.NAME_PROPERTY, Arrays
-                .asList(new StringET1("X"), new StringET1("Y")));
+        Expression in = ExtendedTypeEntity.NAME.in(Arrays.asList(new StringET1("X"), new StringET1("Y")));
         SelectQuery query = new SelectQuery(ExtendedTypeEntity.class, in);
         assertEquals(2, e1.getObjectContext().performQuery(query).size());
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/access/EmbeddingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/EmbeddingIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/EmbeddingIT.java
index 58ddaf4..1486d33 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/EmbeddingIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/EmbeddingIT.java
@@ -24,7 +24,6 @@ import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.di.Inject;
 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.embeddable.EmbedEntity1;
@@ -73,7 +72,7 @@ public class EmbeddingIT extends ServerCase {
         createSelectDataSet();
 
         SelectQuery query = new SelectQuery(EmbedEntity1.class);
-        query.addOrdering(EmbedEntity1.NAME_PROPERTY, SortOrder.ASCENDING);
+        query.addOrdering(EmbedEntity1.NAME.asc());
 
         List<?> results = context.performQuery(query);
         assertEquals(2, results.size());
@@ -127,9 +126,8 @@ public class EmbeddingIT extends ServerCase {
 
         context.commitChanges();
 
-        SelectQuery query = new SelectQuery(EmbedEntity1.class);
-        query.setFetchingDataRows(true);
-        DataRow row = (DataRow) Cayenne.objectForQuery(context, query);
+        SelectQuery<DataRow> query = SelectQuery.dataRowQuery(EmbedEntity1.class);
+        DataRow row = query.selectOne(context);
         assertNotNull(row);
         assertEquals("E11", row.get("EMBEDDED10"));
         assertEquals("E12", row.get("EMBEDDED20"));
@@ -142,7 +140,7 @@ public class EmbeddingIT extends ServerCase {
         createUpdateDataSet();
 
         SelectQuery query = new SelectQuery(EmbedEntity1.class);
-        query.addOrdering(EmbedEntity1.NAME_PROPERTY, SortOrder.ASCENDING);
+        query.addOrdering(EmbedEntity1.NAME.asc());
 
         List<?> results = context.performQuery(query);
         EmbedEntity1 o1 = (EmbedEntity1) results.get(0);
@@ -165,7 +163,7 @@ public class EmbeddingIT extends ServerCase {
         createUpdateDataSet();
 
         SelectQuery query = new SelectQuery(EmbedEntity1.class);
-        query.addOrdering(EmbedEntity1.NAME_PROPERTY, SortOrder.ASCENDING);
+        query.addOrdering(EmbedEntity1.NAME.asc());
 
         List<?> results = context.performQuery(query);
         EmbedEntity1 o1 = (EmbedEntity1) results.get(0);
@@ -178,9 +176,8 @@ public class EmbeddingIT extends ServerCase {
         assertEquals(PersistenceState.MODIFIED, o1.getPersistenceState());
 
         context.commitChanges();
-        SelectQuery query1 = new SelectQuery(EmbedEntity1.class);
-        query1.setFetchingDataRows(true);
-        DataRow row = (DataRow) Cayenne.objectForQuery(context, query1);
+        SelectQuery<DataRow> query1 = SelectQuery.dataRowQuery(EmbedEntity1.class);
+        DataRow row = query1.selectOne(context);
         assertNotNull(row);
         assertEquals("x1", row.get("EMBEDDED10"));
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/access/EnumIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/EnumIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/EnumIT.java
index 81d9b75..035fc3a 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/EnumIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/EnumIT.java
@@ -21,7 +21,6 @@ package org.apache.cayenne.access;
 import org.apache.cayenne.Cayenne;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.query.CapsStrategy;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
@@ -66,9 +65,7 @@ public class EnumIT extends ServerCase {
         createDataSet();
 
         SelectQuery q = new SelectQuery(EnumEntity.class);
-        q.andQualifier(ExpressionFactory.matchExp(
-                EnumEntity.ENUM_ATTRIBUTE_PROPERTY,
-                Enum1.one));
+        q.andQualifier(EnumEntity.ENUM_ATTRIBUTE.eq(Enum1.one));
 
         EnumEntity e = (EnumEntity) Cayenne.objectForQuery(context, q);
         assertNotNull(e);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java
index 29fab90..d5ae2f0 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java
@@ -61,7 +61,7 @@ public class SingleTableInheritance1IT extends ServerCase {
 
         // Per CAY-1379 removing user and then refetching resulted in a FFE downstream
         group1.removeFromGroupMembers(user);
-        Expression exp = ExpressionFactory.matchExp(Role.ROLE_GROUPS_PROPERTY, group2);
+        Expression exp = ExpressionFactory.matchExp(Role.ROLE_GROUPS.getName(), group2);
         SelectQuery query = new SelectQuery(Group.class, exp);
         context.performQuery(query);
         context.commitChanges();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_CalendarEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_CalendarEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_CalendarEntity.java
index b3a8f50..52ad2e1 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_CalendarEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_CalendarEntity.java
@@ -15,12 +15,9 @@ public abstract class _CalendarEntity extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String CALENDAR_FIELD_PROPERTY = "calendarField";
-
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<Calendar> CALENDAR_FIELD = new Property<Calendar>("calendarField");
+    public static final Property<Calendar> CALENDAR_FIELD = new Property<>("calendarField");
 
     public void setCalendarField(Calendar calendarField) {
         writeProperty("calendarField", calendarField);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_DateTestEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_DateTestEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_DateTestEntity.java
index 10163cc..66dc69e 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_DateTestEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/date_time/auto/_DateTestEntity.java
@@ -15,18 +15,11 @@ public abstract class _DateTestEntity extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String DATE_COLUMN_PROPERTY = "dateColumn";
-    @Deprecated
-    public static final String TIME_COLUMN_PROPERTY = "timeColumn";
-    @Deprecated
-    public static final String TIMESTAMP_COLUMN_PROPERTY = "timestampColumn";
-
     public static final String DATE_TEST_ID_PK_COLUMN = "DATE_TEST_ID";
 
-    public static final Property<Date> DATE_COLUMN = new Property<Date>("dateColumn");
-    public static final Property<Date> TIME_COLUMN = new Property<Date>("timeColumn");
-    public static final Property<Date> TIMESTAMP_COLUMN = new Property<Date>("timestampColumn");
+    public static final Property<Date> DATE_COLUMN = new Property<>("dateColumn");
+    public static final Property<Date> TIME_COLUMN = new Property<>("timeColumn");
+    public static final Property<Date> TIMESTAMP_COLUMN = new Property<>("timestampColumn");
 
     public void setDateColumn(Date dateColumn) {
         writeProperty("dateColumn", dateColumn);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteCascade.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteCascade.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteCascade.java
index bd8be7c..691cb9b 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteCascade.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteCascade.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.deleterules.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.deleterules.DeleteRule;
 
 /**
@@ -11,24 +12,26 @@ import org.apache.cayenne.testdo.deleterules.DeleteRule;
  */
 public abstract class _DeleteCascade extends CayenneDataObject {
 
-    public static final String NAME_PROPERTY = "name";
-    public static final String CASCADE_PROPERTY = "cascade";
+    private static final long serialVersionUID = 1L; 
 
     public static final String DELETE_CASCADE_ID_PK_COLUMN = "DELETE_CASCADE_ID";
 
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<DeleteRule> CASCADE = new Property<>("cascade");
+
     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 setCascade(DeleteRule cascade) {
-        setToOneTarget(CASCADE_PROPERTY, cascade, true);
+        setToOneTarget("cascade", cascade, true);
     }
 
     public DeleteRule getCascade() {
-        return (DeleteRule)readProperty(CASCADE_PROPERTY);
+        return (DeleteRule)readProperty("cascade");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteDeny.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteDeny.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteDeny.java
index 4b5069c..56621b8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteDeny.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteDeny.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.deleterules.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.deleterules.DeleteRule;
 
 /**
@@ -11,24 +12,26 @@ import org.apache.cayenne.testdo.deleterules.DeleteRule;
  */
 public abstract class _DeleteDeny extends CayenneDataObject {
 
-    public static final String NAME_PROPERTY = "name";
-    public static final String DENY_PROPERTY = "deny";
+    private static final long serialVersionUID = 1L; 
 
     public static final String DELETE_DENY_ID_PK_COLUMN = "DELETE_DENY_ID";
 
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<DeleteRule> DENY = new Property<>("deny");
+
     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 setDeny(DeleteRule deny) {
-        setToOneTarget(DENY_PROPERTY, deny, true);
+        setToOneTarget("deny", deny, true);
     }
 
     public DeleteRule getDeny() {
-        return (DeleteRule)readProperty(DENY_PROPERTY);
+        return (DeleteRule)readProperty("deny");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteNullify.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteNullify.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteNullify.java
index 10906cb..542a9a5 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteNullify.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteNullify.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.deleterules.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.deleterules.DeleteRule;
 
 /**
@@ -11,24 +12,26 @@ import org.apache.cayenne.testdo.deleterules.DeleteRule;
  */
 public abstract class _DeleteNullify extends CayenneDataObject {
 
-    public static final String NAME_PROPERTY = "name";
-    public static final String NULLIFY_PROPERTY = "nullify";
+    private static final long serialVersionUID = 1L; 
 
     public static final String DELETE_NULLIFY_ID_PK_COLUMN = "DELETE_NULLIFY_ID";
 
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<DeleteRule> NULLIFY = new Property<>("nullify");
+
     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 setNullify(DeleteRule nullify) {
-        setToOneTarget(NULLIFY_PROPERTY, nullify, true);
+        setToOneTarget("nullify", nullify, true);
     }
 
     public DeleteRule getNullify() {
-        return (DeleteRule)readProperty(NULLIFY_PROPERTY);
+        return (DeleteRule)readProperty("nullify");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteRule.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteRule.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteRule.java
index 6dedf75..b7cad7d 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteRule.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/deleterules/auto/_DeleteRule.java
@@ -1,12 +1,13 @@
 package org.apache.cayenne.testdo.deleterules.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.deleterules.DeleteCascade;
 import org.apache.cayenne.testdo.deleterules.DeleteDeny;
 import org.apache.cayenne.testdo.deleterules.DeleteNullify;
 
-import java.util.List;
-
 /**
  * Class _DeleteRule was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually,
@@ -15,53 +16,55 @@ import java.util.List;
  */
 public abstract class _DeleteRule extends CayenneDataObject {
 
-    public static final String NAME_PROPERTY = "name";
-    public static final String FROM_CASCADE_PROPERTY = "fromCascade";
-    public static final String FROM_DENY_PROPERTY = "fromDeny";
-    public static final String FROM_NULLIFY_PROPERTY = "fromNullify";
+    private static final long serialVersionUID = 1L; 
 
     public static final String DELETE_RULE_ID_PK_COLUMN = "DELETE_RULE_ID";
 
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<List<DeleteCascade>> FROM_CASCADE = new Property<>("fromCascade");
+    public static final Property<List<DeleteDeny>> FROM_DENY = new Property<>("fromDeny");
+    public static final Property<List<DeleteNullify>> FROM_NULLIFY = new Property<>("fromNullify");
+
     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 addToFromCascade(DeleteCascade obj) {
-        addToManyTarget(FROM_CASCADE_PROPERTY, obj, true);
+        addToManyTarget("fromCascade", obj, true);
     }
     public void removeFromFromCascade(DeleteCascade obj) {
-        removeToManyTarget(FROM_CASCADE_PROPERTY, obj, true);
+        removeToManyTarget("fromCascade", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<DeleteCascade> getFromCascade() {
-        return (List<DeleteCascade>)readProperty(FROM_CASCADE_PROPERTY);
+        return (List<DeleteCascade>)readProperty("fromCascade");
     }
 
 
     public void addToFromDeny(DeleteDeny obj) {
-        addToManyTarget(FROM_DENY_PROPERTY, obj, true);
+        addToManyTarget("fromDeny", obj, true);
     }
     public void removeFromFromDeny(DeleteDeny obj) {
-        removeToManyTarget(FROM_DENY_PROPERTY, obj, true);
+        removeToManyTarget("fromDeny", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<DeleteDeny> getFromDeny() {
-        return (List<DeleteDeny>)readProperty(FROM_DENY_PROPERTY);
+        return (List<DeleteDeny>)readProperty("fromDeny");
     }
 
 
     public void addToFromNullify(DeleteNullify obj) {
-        addToManyTarget(FROM_NULLIFY_PROPERTY, obj, true);
+        addToManyTarget("fromNullify", obj, true);
     }
     public void removeFromFromNullify(DeleteNullify obj) {
-        removeToManyTarget(FROM_NULLIFY_PROPERTY, obj, true);
+        removeToManyTarget("fromNullify", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<DeleteNullify> getFromNullify() {
-        return (List<DeleteNullify>)readProperty(FROM_NULLIFY_PROPERTY);
+        return (List<DeleteNullify>)readProperty("fromNullify");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_EmbedEntity1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_EmbedEntity1.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_EmbedEntity1.java
index eceeaed..b610a19 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_EmbedEntity1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_EmbedEntity1.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.embeddable.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.embeddable.Embeddable1;
 
 /**
@@ -11,31 +12,33 @@ import org.apache.cayenne.testdo.embeddable.Embeddable1;
  */
 public abstract class _EmbedEntity1 extends CayenneDataObject {
 
-    public static final String EMBEDDED1_PROPERTY = "embedded1";
-    public static final String EMBEDDED2_PROPERTY = "embedded2";
-    public static final String NAME_PROPERTY = "name";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
+    public static final Property<Embeddable1> EMBEDDED1 = new Property<>("embedded1");
+    public static final Property<Embeddable1> EMBEDDED2 = new Property<>("embedded2");
+    public static final Property<String> NAME = new Property<>("name");
+
     public void setEmbedded1(Embeddable1 embedded1) {
-        writeProperty(EMBEDDED1_PROPERTY, embedded1);
+        writeProperty("embedded1", embedded1);
     }
     public Embeddable1 getEmbedded1() {
-        return (Embeddable1)readProperty(EMBEDDED1_PROPERTY);
+        return (Embeddable1)readProperty("embedded1");
     }
 
     public void setEmbedded2(Embeddable1 embedded2) {
-        writeProperty(EMBEDDED2_PROPERTY, embedded2);
+        writeProperty("embedded2", embedded2);
     }
     public Embeddable1 getEmbedded2() {
-        return (Embeddable1)readProperty(EMBEDDED2_PROPERTY);
+        return (Embeddable1)readProperty("embedded2");
     }
 
     public void setName(String name) {
-        writeProperty(NAME_PROPERTY, name);
+        writeProperty("name", name);
     }
     public String getName() {
-        return (String)readProperty(NAME_PROPERTY);
+        return (String)readProperty("name");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_Embeddable1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_Embeddable1.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_Embeddable1.java
index c69e006..449a8f8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_Embeddable1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/embeddable/auto/_Embeddable1.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.embeddable.auto;
 
 import org.apache.cayenne.Persistent;
+import org.apache.cayenne.exp.Property;
 
 /** 
  * Embeddable class _Embeddable1 was generated by Cayenne.
@@ -10,8 +11,8 @@ import org.apache.cayenne.Persistent;
  */
 public abstract class _Embeddable1 extends Object {
 
-    public static final String EMBEDDED10_PROPERTY = "embedded10";
-    public static final String EMBEDDED20_PROPERTY = "embedded20";
+    public static final Property<String> EMBEDDED10 = new Property<>("embedded10");
+    public static final Property<String> EMBEDDED20 = new Property<>("embedded20");
 
     // special properties injected by Cayenne
     private Persistent owner;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/enum_test/auto/_EnumEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/enum_test/auto/_EnumEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/enum_test/auto/_EnumEntity.java
index ed1fee6..50b4821 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/enum_test/auto/_EnumEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/enum_test/auto/_EnumEntity.java
@@ -14,12 +14,9 @@ public abstract class _EnumEntity extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String ENUM_ATTRIBUTE_PROPERTY = "enumAttribute";
-
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<Enum1> ENUM_ATTRIBUTE = new Property<Enum1>("enumAttribute");
+    public static final Property<Enum1> ENUM_ATTRIBUTE = new Property<>("enumAttribute");
 
     public void setEnumAttribute(Enum1 enumAttribute) {
         writeProperty("enumAttribute", enumAttribute);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/extended_type/auto/_ExtendedTypeEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/extended_type/auto/_ExtendedTypeEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/extended_type/auto/_ExtendedTypeEntity.java
index e71a1b5..6ecda53 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/extended_type/auto/_ExtendedTypeEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/extended_type/auto/_ExtendedTypeEntity.java
@@ -14,12 +14,9 @@ public abstract class _ExtendedTypeEntity extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<StringET1> NAME = new Property<StringET1>("name");
+    public static final Property<StringET1> NAME = new Property<>("name");
 
     public void setName(StringET1 name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompKey.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompKey.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompKey.java
index 78e9132..91178ee 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompKey.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompKey.java
@@ -14,17 +14,12 @@ public abstract class _GeneratedColumnCompKey extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String TO_MASTER_PROPERTY = "toMaster";
-
     public static final String AUTO_PK_PK_COLUMN = "AUTO_PK";
     public static final String GENERATED_COLUMN_PK_COLUMN = "GENERATED_COLUMN";
     public static final String PROPAGATED_PK_PK_COLUMN = "PROPAGATED_PK";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<GeneratedColumnCompMaster> TO_MASTER = new Property<GeneratedColumnCompMaster>("toMaster");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<GeneratedColumnCompMaster> TO_MASTER = new Property<>("toMaster");
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompMaster.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompMaster.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompMaster.java
index 16d97ed..bf07582 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompMaster.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnCompMaster.java
@@ -16,15 +16,10 @@ public abstract class _GeneratedColumnCompMaster extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String TO_DETAIL_PROPERTY = "toDetail";
-
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<GeneratedColumnCompKey>> TO_DETAIL = new Property<List<GeneratedColumnCompKey>>("toDetail");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<List<GeneratedColumnCompKey>> TO_DETAIL = new Property<>("toDetail");
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnDep.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnDep.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnDep.java
index 38be7ff..fb524f8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnDep.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnDep.java
@@ -14,15 +14,10 @@ public abstract class _GeneratedColumnDep extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String TO_MASTER_PROPERTY = "toMaster";
-
     public static final String GENERATED_COLUMN_FK_PK_COLUMN = "GENERATED_COLUMN_FK";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<GeneratedColumnTestEntity> TO_MASTER = new Property<GeneratedColumnTestEntity>("toMaster");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<GeneratedColumnTestEntity> TO_MASTER = new Property<>("toMaster");
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTest2.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTest2.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTest2.java
index 3628bfb..5f27685 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTest2.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTest2.java
@@ -13,12 +13,9 @@ public abstract class _GeneratedColumnTest2 extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-
     public static final String GENERATED_COLUMN_PK_COLUMN = "GENERATED_COLUMN";
 
-    public static final Property<String> NAME = new Property<String>("name");
+    public static final Property<String> NAME = new Property<>("name");
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTestEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTestEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTestEntity.java
index 8c82030..83b3ec2 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTestEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedColumnTestEntity.java
@@ -14,15 +14,10 @@ public abstract class _GeneratedColumnTestEntity extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String TO_DEP_PROPERTY = "toDep";
-
     public static final String GENERATED_COLUMN_PK_COLUMN = "GENERATED_COLUMN";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<GeneratedColumnDep> TO_DEP = new Property<GeneratedColumnDep>("toDep");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<GeneratedColumnDep> TO_DEP = new Property<>("toDep");
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF1.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF1.java
index d93337d..d139240 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF1.java
@@ -16,12 +16,9 @@ public abstract class _GeneratedF1 extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String F2_PROPERTY = "f2";
-
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<List<GeneratedF2>> F2 = new Property<List<GeneratedF2>>("f2");
+    public static final Property<List<GeneratedF2>> F2 = new Property<>("f2");
 
     public void addToF2(GeneratedF2 obj) {
         addToManyTarget("f2", obj, true);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF2.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF2.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF2.java
index 048e8a5..1d1b92f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF2.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/generated/auto/_GeneratedF2.java
@@ -16,12 +16,9 @@ public abstract class _GeneratedF2 extends CayenneDataObject {
 
     private static final long serialVersionUID = 1L; 
 
-    @Deprecated
-    public static final String F1_PROPERTY = "f1";
-
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<List<GeneratedF1>> F1 = new Property<List<GeneratedF1>>("f1");
+    public static final Property<List<GeneratedF1>> F1 = new Property<>("f1");
 
     public void addToF1(GeneratedF1 obj) {
         addToManyTarget("f1", obj, true);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_BaseEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_BaseEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_BaseEntity.java
index 50f239c..ea0d99b 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_BaseEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_BaseEntity.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.inheritance.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance.DirectToSubEntity;
 import org.apache.cayenne.testdo.inheritance.RelatedEntity;
 
@@ -12,34 +13,36 @@ import org.apache.cayenne.testdo.inheritance.RelatedEntity;
  */
 public abstract class _BaseEntity extends CayenneDataObject {
 
-    public static final String ENTITY_TYPE_PROPERTY = "entityType";
-    public static final String TO_DIRECT_TO_SUB_ENTITY_PROPERTY = "toDirectToSubEntity";
-    public static final String TO_RELATED_ENTITY_PROPERTY = "toRelatedEntity";
+    private static final long serialVersionUID = 1L; 
 
     public static final String BASE_ENTITY_ID_PK_COLUMN = "BASE_ENTITY_ID";
 
+    public static final Property<String> ENTITY_TYPE = new Property<>("entityType");
+    public static final Property<DirectToSubEntity> TO_DIRECT_TO_SUB_ENTITY = new Property<>("toDirectToSubEntity");
+    public static final Property<RelatedEntity> TO_RELATED_ENTITY = new Property<>("toRelatedEntity");
+
     public void setEntityType(String entityType) {
-        writeProperty(ENTITY_TYPE_PROPERTY, entityType);
+        writeProperty("entityType", entityType);
     }
     public String getEntityType() {
-        return (String)readProperty(ENTITY_TYPE_PROPERTY);
+        return (String)readProperty("entityType");
     }
 
     public void setToDirectToSubEntity(DirectToSubEntity toDirectToSubEntity) {
-        setToOneTarget(TO_DIRECT_TO_SUB_ENTITY_PROPERTY, toDirectToSubEntity, true);
+        setToOneTarget("toDirectToSubEntity", toDirectToSubEntity, true);
     }
 
     public DirectToSubEntity getToDirectToSubEntity() {
-        return (DirectToSubEntity)readProperty(TO_DIRECT_TO_SUB_ENTITY_PROPERTY);
+        return (DirectToSubEntity)readProperty("toDirectToSubEntity");
     }
 
 
     public void setToRelatedEntity(RelatedEntity toRelatedEntity) {
-        setToOneTarget(TO_RELATED_ENTITY_PROPERTY, toRelatedEntity, true);
+        setToOneTarget("toRelatedEntity", toRelatedEntity, true);
     }
 
     public RelatedEntity getToRelatedEntity() {
-        return (RelatedEntity)readProperty(TO_RELATED_ENTITY_PROPERTY);
+        return (RelatedEntity)readProperty("toRelatedEntity");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_DirectToSubEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_DirectToSubEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_DirectToSubEntity.java
index d731b06..c6ec424 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_DirectToSubEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_DirectToSubEntity.java
@@ -1,10 +1,11 @@
 package org.apache.cayenne.testdo.inheritance.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance.SubEntity;
 
-import java.util.List;
-
 /**
  * Class _DirectToSubEntity was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually,
@@ -13,19 +14,21 @@ import java.util.List;
  */
 public abstract class _DirectToSubEntity extends CayenneDataObject {
 
-    public static final String SUB_ENTITIES_PROPERTY = "subEntities";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
+    public static final Property<List<SubEntity>> SUB_ENTITIES = new Property<>("subEntities");
+
     public void addToSubEntities(SubEntity obj) {
-        addToManyTarget(SUB_ENTITIES_PROPERTY, obj, true);
+        addToManyTarget("subEntities", obj, true);
     }
     public void removeFromSubEntities(SubEntity obj) {
-        removeToManyTarget(SUB_ENTITIES_PROPERTY, obj, true);
+        removeToManyTarget("subEntities", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<SubEntity> getSubEntities() {
-        return (List<SubEntity>)readProperty(SUB_ENTITIES_PROPERTY);
+        return (List<SubEntity>)readProperty("subEntities");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_RelatedEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_RelatedEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_RelatedEntity.java
index 4cd2462..b860ca2 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_RelatedEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_RelatedEntity.java
@@ -1,11 +1,12 @@
 package org.apache.cayenne.testdo.inheritance.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance.BaseEntity;
 import org.apache.cayenne.testdo.inheritance.SubEntity;
 
-import java.util.List;
-
 /**
  * Class _RelatedEntity was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually,
@@ -14,32 +15,34 @@ import java.util.List;
  */
 public abstract class _RelatedEntity extends CayenneDataObject {
 
-    public static final String BASE_ENTITIES_PROPERTY = "baseEntities";
-    public static final String SUB_ENTITIES_PROPERTY = "subEntities";
+    private static final long serialVersionUID = 1L; 
 
     public static final String RELATED_ENTITY_ID_PK_COLUMN = "RELATED_ENTITY_ID";
 
+    public static final Property<List<BaseEntity>> BASE_ENTITIES = new Property<>("baseEntities");
+    public static final Property<List<SubEntity>> SUB_ENTITIES = new Property<>("subEntities");
+
     public void addToBaseEntities(BaseEntity obj) {
-        addToManyTarget(BASE_ENTITIES_PROPERTY, obj, true);
+        addToManyTarget("baseEntities", obj, true);
     }
     public void removeFromBaseEntities(BaseEntity obj) {
-        removeToManyTarget(BASE_ENTITIES_PROPERTY, obj, true);
+        removeToManyTarget("baseEntities", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<BaseEntity> getBaseEntities() {
-        return (List<BaseEntity>)readProperty(BASE_ENTITIES_PROPERTY);
+        return (List<BaseEntity>)readProperty("baseEntities");
     }
 
 
     public void addToSubEntities(SubEntity obj) {
-        addToManyTarget(SUB_ENTITIES_PROPERTY, obj, true);
+        addToManyTarget("subEntities", obj, true);
     }
     public void removeFromSubEntities(SubEntity obj) {
-        removeToManyTarget(SUB_ENTITIES_PROPERTY, obj, true);
+        removeToManyTarget("subEntities", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<SubEntity> getSubEntities() {
-        return (List<SubEntity>)readProperty(SUB_ENTITIES_PROPERTY);
+        return (List<SubEntity>)readProperty("subEntities");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_SubEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_SubEntity.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_SubEntity.java
index 8ede368..29ec798 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_SubEntity.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance/auto/_SubEntity.java
@@ -10,7 +10,9 @@ import org.apache.cayenne.testdo.inheritance.BaseEntity;
  */
 public abstract class _SubEntity extends BaseEntity {
 
+    private static final long serialVersionUID = 1L; 
 
     public static final String BASE_ENTITY_ID_PK_COLUMN = "BASE_ENTITY_ID";
 
+
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Group.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Group.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Group.java
index 68fc5d8..f2a4032 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Group.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Group.java
@@ -2,6 +2,7 @@ package org.apache.cayenne.testdo.inheritance_flat.auto;
 
 import java.util.List;
 
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance_flat.GroupProperties;
 import org.apache.cayenne.testdo.inheritance_flat.Role;
 import org.apache.cayenne.testdo.inheritance_flat.User;
@@ -14,29 +15,31 @@ import org.apache.cayenne.testdo.inheritance_flat.User;
  */
 public abstract class _Group extends User {
 
-    public static final String GROUP_MEMBERS_PROPERTY = "groupMembers";
-    public static final String GROUP_PROPERTIES_PROPERTY = "groupProperties";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "id";
 
+    public static final Property<List<Role>> GROUP_MEMBERS = new Property<>("groupMembers");
+    public static final Property<GroupProperties> GROUP_PROPERTIES = new Property<>("groupProperties");
+
     public void addToGroupMembers(Role obj) {
-        addToManyTarget(GROUP_MEMBERS_PROPERTY, obj, true);
+        addToManyTarget("groupMembers", obj, true);
     }
     public void removeFromGroupMembers(Role obj) {
-        removeToManyTarget(GROUP_MEMBERS_PROPERTY, obj, true);
+        removeToManyTarget("groupMembers", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<Role> getGroupMembers() {
-        return (List<Role>)readProperty(GROUP_MEMBERS_PROPERTY);
+        return (List<Role>)readProperty("groupMembers");
     }
 
 
     public void setGroupProperties(GroupProperties groupProperties) {
-        setToOneTarget(GROUP_PROPERTIES_PROPERTY, groupProperties, true);
+        setToOneTarget("groupProperties", groupProperties, true);
     }
 
     public GroupProperties getGroupProperties() {
-        return (GroupProperties)readProperty(GROUP_PROPERTIES_PROPERTY);
+        return (GroupProperties)readProperty("groupProperties");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_GroupProperties.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_GroupProperties.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_GroupProperties.java
index 1a64a47..5f6c4d4 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_GroupProperties.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_GroupProperties.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.inheritance_flat.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance_flat.Group;
 
 /**
@@ -11,32 +12,34 @@ import org.apache.cayenne.testdo.inheritance_flat.Group;
  */
 public abstract class _GroupProperties extends CayenneDataObject {
 
-    public static final String DESCRIPTION_PROPERTY = "description";
-    public static final String ID_PROPERTY = "id";
-    public static final String GROUP_PROPERTY = "group";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "id";
 
+    public static final Property<String> DESCRIPTION = new Property<>("description");
+    public static final Property<Long> ID = new Property<>("id");
+    public static final Property<Group> GROUP = new Property<>("group");
+
     public void setDescription(String description) {
-        writeProperty(DESCRIPTION_PROPERTY, description);
+        writeProperty("description", description);
     }
     public String getDescription() {
-        return (String)readProperty(DESCRIPTION_PROPERTY);
+        return (String)readProperty("description");
     }
 
     public void setId(Long id) {
-        writeProperty(ID_PROPERTY, id);
+        writeProperty("id", id);
     }
     public Long getId() {
-        return (Long)readProperty(ID_PROPERTY);
+        return (Long)readProperty("id");
     }
 
     public void setGroup(Group group) {
-        setToOneTarget(GROUP_PROPERTY, group, true);
+        setToOneTarget("group", group, true);
     }
 
     public Group getGroup() {
-        return (Group)readProperty(GROUP_PROPERTY);
+        return (Group)readProperty("group");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Role.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Role.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Role.java
index 055615d..6b16b42 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Role.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_Role.java
@@ -3,6 +3,7 @@ package org.apache.cayenne.testdo.inheritance_flat.auto;
 import java.util.List;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance_flat.Group;
 
 /**
@@ -13,45 +14,47 @@ import org.apache.cayenne.testdo.inheritance_flat.Group;
  */
 public abstract class _Role extends CayenneDataObject {
 
-    public static final String ID_PROPERTY = "id";
-    public static final String NAME_PROPERTY = "name";
-    public static final String TYPE_PROPERTY = "type";
-    public static final String ROLE_GROUPS_PROPERTY = "roleGroups";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "id";
 
+    public static final Property<Long> ID = new Property<>("id");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<Integer> TYPE = new Property<>("type");
+    public static final Property<List<Group>> ROLE_GROUPS = new Property<>("roleGroups");
+
     public void setId(long id) {
-        writeProperty(ID_PROPERTY, id);
+        writeProperty("id", id);
     }
     public long getId() {
-        Object value = readProperty(ID_PROPERTY);
+        Object value = readProperty("id");
         return (value != null) ? (Long) value : 0;
     }
 
     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 setType(int type) {
-        writeProperty(TYPE_PROPERTY, type);
+        writeProperty("type", type);
     }
     public int getType() {
-        Object value = readProperty(TYPE_PROPERTY);
+        Object value = readProperty("type");
         return (value != null) ? (Integer) value : 0;
     }
 
     public void addToRoleGroups(Group obj) {
-        addToManyTarget(ROLE_GROUPS_PROPERTY, obj, true);
+        addToManyTarget("roleGroups", obj, true);
     }
     public void removeFromRoleGroups(Group obj) {
-        removeToManyTarget(ROLE_GROUPS_PROPERTY, obj, true);
+        removeToManyTarget("roleGroups", obj, true);
     }
     @SuppressWarnings("unchecked")
     public List<Group> getRoleGroups() {
-        return (List<Group>)readProperty(ROLE_GROUPS_PROPERTY);
+        return (List<Group>)readProperty("roleGroups");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_User.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_User.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_User.java
index 72494f2..769f40a 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_User.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_User.java
@@ -1,5 +1,6 @@
 package org.apache.cayenne.testdo.inheritance_flat.auto;
 
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance_flat.Role;
 import org.apache.cayenne.testdo.inheritance_flat.UserProperties;
 
@@ -11,16 +12,18 @@ import org.apache.cayenne.testdo.inheritance_flat.UserProperties;
  */
 public abstract class _User extends Role {
 
-    public static final String USER_PROPERTIES_PROPERTY = "userProperties";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "id";
 
+    public static final Property<UserProperties> USER_PROPERTIES = new Property<>("userProperties");
+
     public void setUserProperties(UserProperties userProperties) {
-        setToOneTarget(USER_PROPERTIES_PROPERTY, userProperties, true);
+        setToOneTarget("userProperties", userProperties, true);
     }
 
     public UserProperties getUserProperties() {
-        return (UserProperties)readProperty(USER_PROPERTIES_PROPERTY);
+        return (UserProperties)readProperty("userProperties");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_UserProperties.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_UserProperties.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_UserProperties.java
index ecb7423..7a046a8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_UserProperties.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_flat/auto/_UserProperties.java
@@ -1,6 +1,7 @@
 package org.apache.cayenne.testdo.inheritance_flat.auto;
 
 import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance_flat.User;
 
 /**
@@ -11,32 +12,34 @@ import org.apache.cayenne.testdo.inheritance_flat.User;
  */
 public abstract class _UserProperties extends CayenneDataObject {
 
-    public static final String ID_PROPERTY = "id";
-    public static final String NICKNAME_PROPERTY = "nickname";
-    public static final String USER_PROPERTY = "user";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "id";
 
+    public static final Property<Long> ID = new Property<>("id");
+    public static final Property<String> NICKNAME = new Property<>("nickname");
+    public static final Property<User> USER = new Property<>("user");
+
     public void setId(Long id) {
-        writeProperty(ID_PROPERTY, id);
+        writeProperty("id", id);
     }
     public Long getId() {
-        return (Long)readProperty(ID_PROPERTY);
+        return (Long)readProperty("id");
     }
 
     public void setNickname(String nickname) {
-        writeProperty(NICKNAME_PROPERTY, nickname);
+        writeProperty("nickname", nickname);
     }
     public String getNickname() {
-        return (String)readProperty(NICKNAME_PROPERTY);
+        return (String)readProperty("nickname");
     }
 
     public void setUser(User user) {
-        setToOneTarget(USER_PROPERTY, user, true);
+        setToOneTarget("user", user, true);
     }
 
     public User getUser() {
-        return (User)readProperty(USER_PROPERTY);
+        return (User)readProperty("user");
     }
 
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/IvSub3.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/IvSub3.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/IvSub3.java
index 13bf43d..8e3fb72 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/IvSub3.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/IvSub3.java
@@ -25,10 +25,7 @@ public class IvSub3 extends _IvSub3 {
 
     private static final long serialVersionUID = 1L;
 
-    @Override
-    protected void onPrePersist() {
-//        if(getIvRoot() == null) {
-//            throw new IllegalStateException("IvRoot must be set");
-//        }
+    public void setIvRoot(IvRoot ivRoot) {
+        setToOneTarget("ivRoot", ivRoot, true);
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Root.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Root.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Root.java
index d17dce6..51d7c2d 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Root.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Root.java
@@ -15,8 +15,8 @@ public abstract class _Iv1Root extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> DISCRIMINATOR = new Property<String>("discriminator");
-    public static final Property<String> NAME = new Property<String>("name");
+    public static final Property<String> DISCRIMINATOR = new Property<>("discriminator");
+    public static final Property<String> NAME = new Property<>("name");
 
     public void setDiscriminator(String discriminator) {
         writeProperty("discriminator", discriminator);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Sub1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Sub1.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Sub1.java
index 7990007..47e6d58 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Sub1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv1Sub1.java
@@ -15,7 +15,7 @@ public abstract class _Iv1Sub1 extends Iv1Root {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
+    public static final Property<String> NAME = new Property<>("name");
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Root.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Root.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Root.java
index c118504..70d8ec6 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Root.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Root.java
@@ -15,7 +15,7 @@ public abstract class _Iv2Root extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> DISCRIMINATOR = new Property<String>("discriminator");
+    public static final Property<String> DISCRIMINATOR = new Property<>("discriminator");
 
     public void setDiscriminator(String discriminator) {
         writeProperty("discriminator", discriminator);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Sub1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Sub1.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Sub1.java
index 0e2a642..b086375 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Sub1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_Iv2Sub1.java
@@ -16,7 +16,7 @@ public abstract class _Iv2Sub1 extends Iv2Root {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<Iv2X> X = new Property<Iv2X>("x");
+    public static final Property<Iv2X> X = new Property<>("x");
 
     public void setX(Iv2X x) {
         setToOneTarget("x", x, true);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvAbstract.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvAbstract.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvAbstract.java
index b22d7f8..fc65225 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvAbstract.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvAbstract.java
@@ -15,7 +15,7 @@ public abstract class _IvAbstract extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> TYPE = new Property<String>("type");
+    public static final Property<String> TYPE = new Property<>("type");
 
     public void setType(String type) {
         writeProperty("type", type);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvBase.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvBase.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvBase.java
index a7325ff..30dd58d 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvBase.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvBase.java
@@ -4,7 +4,7 @@ import org.apache.cayenne.CayenneDataObject;
 import org.apache.cayenne.exp.Property;
 
 /**
- * Class _IvAbstract was generated by Cayenne.
+ * Class _IvBase was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually,
  * since it may be overwritten next time code is regenerated.
  * If you need to make any customizations, please use subclass.
@@ -15,15 +15,8 @@ public abstract class _IvBase extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> TYPE = new Property<String>("type");
-    public static final Property<String> NAME = new Property<String>("name");
-
-    public void setType(String type) {
-        writeProperty("type", type);
-    }
-    public String getType() {
-        return (String)readProperty("type");
-    }
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<String> TYPE = new Property<>("type");
 
     public void setName(String name) {
         writeProperty("name", name);
@@ -32,4 +25,11 @@ public abstract class _IvBase extends CayenneDataObject {
         return (String)readProperty("name");
     }
 
+    public void setType(String type) {
+        writeProperty("type", type);
+    }
+    public String getType() {
+        return (String)readProperty("type");
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvConcrete.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvConcrete.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvConcrete.java
index 6cdc238..9d83a29 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvConcrete.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvConcrete.java
@@ -18,9 +18,9 @@ public abstract class _IvConcrete extends IvAbstract {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<IvConcrete>> CHILDREN = new Property<List<IvConcrete>>("children");
-    public static final Property<IvConcrete> PARENT = new Property<IvConcrete>("parent");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<List<IvConcrete>> CHILDREN = new Property<>("children");
+    public static final Property<IvConcrete> PARENT = new Property<>("parent");
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvImpl.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvImpl.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvImpl.java
index 4e05db3..cd71ea5 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvImpl.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvImpl.java
@@ -5,7 +5,7 @@ import org.apache.cayenne.testdo.inheritance_vertical.IvBase;
 import org.apache.cayenne.testdo.inheritance_vertical.IvOther;
 
 /**
- * Class _IvConcrete was generated by Cayenne.
+ * Class _IvImpl was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually,
  * since it may be overwritten next time code is regenerated.
  * If you need to make any customizations, please use subclass.
@@ -16,8 +16,8 @@ public abstract class _IvImpl extends IvBase {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> ATTR1 = new Property<String>("attr1");
-    public static final Property<IvOther> OTHER = new Property<IvOther>("other");
+    public static final Property<String> ATTR1 = new Property<>("attr1");
+    public static final Property<IvOther> OTHER = new Property<>("other");
 
     public void setAttr1(String attr1) {
         writeProperty("attr1", attr1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvOther.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvOther.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvOther.java
index 52be2ea..e4ae2af 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvOther.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvOther.java
@@ -1,13 +1,13 @@
 package org.apache.cayenne.testdo.inheritance_vertical.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.CayenneDataObject;
 import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.testdo.inheritance_vertical.IvImpl;
 
-import java.util.List;
-
 /**
- * Class _IvConcrete was generated by Cayenne.
+ * Class _IvOther was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually,
  * since it may be overwritten next time code is regenerated.
  * If you need to make any customizations, please use subclass.
@@ -18,8 +18,8 @@ public abstract class _IvOther extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<IvImpl>> IMPLS = new Property<List<IvImpl>>("impls");
+    public static final Property<String> NAME = new Property<>("name");
+    public static final Property<List<IvImpl>> IMPLS = new Property<>("impls");
 
     public void setName(String name) {
         writeProperty("name", name);
@@ -39,4 +39,5 @@ public abstract class _IvOther extends CayenneDataObject {
         return (List<IvImpl>)readProperty("impls");
     }
 
+
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvRoot.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvRoot.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvRoot.java
index 09b8ceb..814608a 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvRoot.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvRoot.java
@@ -15,8 +15,8 @@ public abstract class _IvRoot extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> DISCRIMINATOR = new Property<String>("discriminator");
-    public static final Property<String> NAME = new Property<String>("name");
+    public static final Property<String> DISCRIMINATOR = new Property<>("discriminator");
+    public static final Property<String> NAME = new Property<>("name");
 
     public void setDiscriminator(String discriminator) {
         writeProperty("discriminator", discriminator);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1.java
index ff4410b..1aa12cd 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1.java
@@ -15,7 +15,7 @@ public abstract class _IvSub1 extends IvRoot {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> SUB1NAME = new Property<String>("sub1Name");
+    public static final Property<String> SUB1NAME = new Property<>("sub1Name");
 
     public void setSub1Name(String sub1Name) {
         writeProperty("sub1Name", sub1Name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1Sub1.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1Sub1.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1Sub1.java
index 21a8525..3dcda28 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1Sub1.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub1Sub1.java
@@ -15,7 +15,7 @@ public abstract class _IvSub1Sub1 extends IvSub1 {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> SUB1SUB1NAME = new Property<String>("sub1Sub1Name");
+    public static final Property<String> SUB1SUB1NAME = new Property<>("sub1Sub1Name");
 
     public void setSub1Sub1Name(String sub1Sub1Name) {
         writeProperty("sub1Sub1Name", sub1Sub1Name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub2.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub2.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub2.java
index 88f8e32..a245879 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub2.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub2.java
@@ -15,8 +15,8 @@ public abstract class _IvSub2 extends IvRoot {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> SUB2ATTR = new Property<String>("sub2Attr");
-    public static final Property<String> SUB2NAME = new Property<String>("sub2Name");
+    public static final Property<String> SUB2ATTR = new Property<>("sub2Attr");
+    public static final Property<String> SUB2NAME = new Property<>("sub2Name");
 
     public void setSub2Attr(String sub2Attr) {
         writeProperty("sub2Attr", sub2Attr);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub3.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub3.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub3.java
index 16b4edf..1b66feb 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub3.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/inheritance_vertical/auto/_IvSub3.java
@@ -15,16 +15,12 @@ public abstract class _IvSub3 extends IvRoot {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<IvRoot> IV_ROOT = new Property<IvRoot>("ivRoot");
+    public static final Property<IvRoot> IV_ROOT = new Property<>("ivRoot");
 
-    public void setIvRoot(IvRoot ivRoot) {
-        setToOneTarget("ivRoot", ivRoot, true);
-    }
 
     public IvRoot getIvRoot() {
         return (IvRoot)readProperty("ivRoot");
     }
 
-    protected abstract void onPrePersist();
 
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/java/org/apache/cayenne/testdo/lifecycle_callbacks_order/auto/_Lifecycle.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/lifecycle_callbacks_order/auto/_Lifecycle.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/lifecycle_callbacks_order/auto/_Lifecycle.java
index 76958cd..1353bf4 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/lifecycle_callbacks_order/auto/_Lifecycle.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/lifecycle_callbacks_order/auto/_Lifecycle.java
@@ -15,7 +15,7 @@ public abstract class _Lifecycle extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
+    public static final Property<String> NAME = new Property<>("name");
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/resources/cayenne-enum.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/cayenne-enum.xml b/cayenne-server/src/test/resources/cayenne-enum.xml
index df69b89..17eda24 100644
--- a/cayenne-server/src/test/resources/cayenne-enum.xml
+++ b/cayenne-server/src/test/resources/cayenne-enum.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <domain project-version="9">
-    <map name="enum"/>
+	<map name="enum"/>
 </domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/48a35028/cayenne-server/src/test/resources/enum.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/enum.map.xml b/cayenne-server/src/test/resources/enum.map.xml
index 9a1e9c9..e4a2807 100644
--- a/cayenne-server/src/test/resources/enum.map.xml
+++ b/cayenne-server/src/test/resources/enum.map.xml
@@ -1,18 +1,18 @@
 <?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.enum"/>
-    <property name="defaultSuperclass" value="org.apache.cayenne.CayenneDataObject"/>
-    <property name="clientSupported" value="true"/>
-    <property name="defaultClientPackage" value="test.client"/>
-    <property name="defaultClientSuperclass" value="org.apache.cayenne.PersistentObject"/>
-    <db-entity name="ENUM_ENTITY">
-        <db-attribute name="ENUM_ATTRIBUTE" type="VARCHAR" length="250"/>
-        <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-    </db-entity>
-    <obj-entity name="EnumEntity" className="org.apache.cayenne.testdo.enum_test.EnumEntity" dbEntityName="ENUM_ENTITY">
-        <obj-attribute name="enumAttribute" type="org.apache.cayenne.testdo.enum_test.Enum1" db-attribute-path="ENUM_ATTRIBUTE"/>
-    </obj-entity>
+	 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.enum_test"/>
+	<property name="defaultSuperclass" value="org.apache.cayenne.CayenneDataObject"/>
+	<property name="clientSupported" value="true"/>
+	<property name="defaultClientPackage" value="test.client"/>
+	<property name="defaultClientSuperclass" value="org.apache.cayenne.PersistentObject"/>
+	<db-entity name="ENUM_ENTITY">
+		<db-attribute name="ENUM_ATTRIBUTE" type="VARCHAR" length="250"/>
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<obj-entity name="EnumEntity" className="org.apache.cayenne.testdo.enum_test.EnumEntity" dbEntityName="ENUM_ENTITY">
+		<obj-attribute name="enumAttribute" type="org.apache.cayenne.testdo.enum_test.Enum1" db-attribute-path="ENUM_ATTRIBUTE"/>
+	</obj-entity>
 </data-map>


Mime
View raw message