You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2017/02/13 14:44:25 UTC

cayenne git commit: CAY-2227 Update generated sources

Repository: cayenne
Updated Branches:
  refs/heads/master 86d306474 -> f75229be4


CAY-2227 Update generated sources


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

Branch: refs/heads/master
Commit: f75229be48e21668640f0f4eea6386bf90d4d80d
Parents: 86d3064
Author: Nikita Timofeev <st...@gmail.com>
Authored: Mon Feb 13 17:44:17 2017 +0300
Committer: Nikita Timofeev <st...@gmail.com>
Committed: Mon Feb 13 17:44:17 2017 +0300

----------------------------------------------------------------------
 .../cayenne/lifecycle/db/auto/_AuditLog.java    |  2 +-
 .../cayenne/lifecycle/db/auto/_Auditable1.java  |  4 +-
 .../cayenne/lifecycle/db/auto/_Auditable2.java  |  6 +--
 .../cayenne/lifecycle/db/auto/_Auditable3.java  |  6 +--
 .../cayenne/lifecycle/db/auto/_Auditable4.java  |  6 +--
 .../lifecycle/db/auto/_AuditableChild1.java     |  4 +-
 .../lifecycle/db/auto/_AuditableChild2.java     |  4 +-
 .../lifecycle/db/auto/_AuditableChild3.java     |  6 +--
 .../lifecycle/db/auto/_AuditableChildUuid.java  |  6 +--
 .../apache/cayenne/lifecycle/db/auto/_E3.java   |  2 +-
 .../apache/cayenne/lifecycle/db/auto/_E4.java   |  2 +-
 .../cayenne/lifecycle/db/auto/_SortDep.java     |  2 +-
 .../cayenne/lifecycle/db/auto/_SortRoot.java    |  2 +-
 .../cayenne/lifecycle/db/auto/_UuidRoot1.java   |  2 +-
 .../protostuff/persistent/auto/_MtTable1.java   | 14 +++----
 .../protostuff/persistent/auto/_MtTable2.java   |  4 +-
 .../tutorial/persistent/auto/_Artist.java       |  6 +--
 .../tutorial/persistent/auto/_Gallery.java      |  4 +-
 .../tutorial/persistent/auto/_Painting.java     |  6 +--
 .../persistent/client/auto/_Artist.java         |  6 +--
 .../persistent/client/auto/_Gallery.java        |  4 +-
 .../persistent/client/auto/_Painting.java       |  6 +--
 .../tutorial/persistent/auto/_Artist.java       | 13 ++----
 .../tutorial/persistent/auto/_Gallery.java      |  9 ++---
 .../tutorial/persistent/auto/_Painting.java     | 13 ++----
 .../persistent/client/auto/_Artist.java         | 28 ++++++++-----
 .../persistent/client/auto/_Gallery.java        | 22 ++++++----
 .../persistent/client/auto/_Painting.java       | 42 +++++++++++++++-----
 .../src/main/resources/cayenne-project.xml      |  2 +-
 .../src/main/resources/datamap.map.xml          |  6 +--
 .../tutorial/persistent/auto/_Artist.java       | 13 ++----
 .../tutorial/persistent/auto/_Gallery.java      |  9 ++---
 .../tutorial/persistent/auto/_Painting.java     | 13 ++----
 .../src/main/resources/cayenne-project.xml      |  2 +-
 .../tutorial/src/main/resources/datamap.map.xml |  6 +--
 35 files changed, 148 insertions(+), 134 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java
index 6c870d6..8a30f01 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java
@@ -15,7 +15,7 @@ public abstract class _AuditLog extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> LOG = new Property<String>("log");
+    public static final Property<String> LOG = Property.create("log", String.class);
 
     public void setLog(String log) {
         writeProperty("log", log);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java
index f31b442..df212a1 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java
@@ -18,8 +18,8 @@ public abstract class _Auditable1 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> CHAR_PROPERTY1 = new Property<String>("charProperty1");
-    public static final Property<List<AuditableChild1>> CHILDREN1 = new Property<List<AuditableChild1>>("children1");
+    public static final Property<String> CHAR_PROPERTY1 = Property.create("charProperty1", String.class);
+    public static final Property<List<AuditableChild1>> CHILDREN1 = Property.create("children1", List.class);
 
     public void setCharProperty1(String charProperty1) {
         writeProperty("charProperty1", charProperty1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java
index 94ff9c3..ea7a51b 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java
@@ -18,9 +18,9 @@ public abstract class _Auditable2 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> CHAR_PROPERTY1 = new Property<String>("charProperty1");
-    public static final Property<String> CHAR_PROPERTY2 = new Property<String>("charProperty2");
-    public static final Property<List<AuditableChild3>> CHILDREN = new Property<List<AuditableChild3>>("children");
+    public static final Property<String> CHAR_PROPERTY1 = Property.create("charProperty1", String.class);
+    public static final Property<String> CHAR_PROPERTY2 = Property.create("charProperty2", String.class);
+    public static final Property<List<AuditableChild3>> CHILDREN = Property.create("children", List.class);
 
     public void setCharProperty1(String charProperty1) {
         writeProperty("charProperty1", charProperty1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java
index 544cb71..24ca50b 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java
@@ -18,9 +18,9 @@ public abstract class _Auditable3 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> CHAR_PROPERTY1 = new Property<String>("charProperty1");
-    public static final Property<String> CHAR_PROPERTY2 = new Property<String>("charProperty2");
-    public static final Property<List<Auditable4>> AUDITABLE4S = new Property<List<Auditable4>>("auditable4s");
+    public static final Property<String> CHAR_PROPERTY1 = Property.create("charProperty1", String.class);
+    public static final Property<String> CHAR_PROPERTY2 = Property.create("charProperty2", String.class);
+    public static final Property<List<Auditable4>> AUDITABLE4S = Property.create("auditable4s", List.class);
 
     public void setCharProperty1(String charProperty1) {
         writeProperty("charProperty1", charProperty1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java
index eec1048..f79e125 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java
@@ -16,9 +16,9 @@ public abstract class _Auditable4 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> CHAR_PROPERTY1 = new Property<String>("charProperty1");
-    public static final Property<String> CHAR_PROPERTY2 = new Property<String>("charProperty2");
-    public static final Property<Auditable3> AUDITABLE3 = new Property<Auditable3>("auditable3");
+    public static final Property<String> CHAR_PROPERTY1 = Property.create("charProperty1", String.class);
+    public static final Property<String> CHAR_PROPERTY2 = Property.create("charProperty2", String.class);
+    public static final Property<Auditable3> AUDITABLE3 = Property.create("auditable3", Auditable3.class);
 
     public void setCharProperty1(String charProperty1) {
         writeProperty("charProperty1", charProperty1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java
index bcc8e8a..96f21b0 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java
@@ -16,8 +16,8 @@ public abstract class _AuditableChild1 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> CHAR_PROPERTY1 = new Property<String>("charProperty1");
-    public static final Property<Auditable1> PARENT = new Property<Auditable1>("parent");
+    public static final Property<String> CHAR_PROPERTY1 = Property.create("charProperty1", String.class);
+    public static final Property<Auditable1> PARENT = Property.create("parent", Auditable1.class);
 
     public void setCharProperty1(String charProperty1) {
         writeProperty("charProperty1", charProperty1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild2.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild2.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild2.java
index b44d839..9a5cc2c 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild2.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild2.java
@@ -16,8 +16,8 @@ public abstract class _AuditableChild2 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> CHAR_PROPERTY1 = new Property<String>("charProperty1");
-    public static final Property<Auditable1> PARENT = new Property<Auditable1>("parent");
+    public static final Property<String> CHAR_PROPERTY1 = Property.create("charProperty1", String.class);
+    public static final Property<Auditable1> PARENT = Property.create("parent", Auditable1.class);
 
     public void setCharProperty1(String charProperty1) {
         writeProperty("charProperty1", charProperty1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java
index c122f9a..fb2f26a 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java
@@ -16,9 +16,9 @@ public abstract class _AuditableChild3 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> CHAR_PROPERTY1 = new Property<String>("charProperty1");
-    public static final Property<String> CHAR_PROPERTY2 = new Property<String>("charProperty2");
-    public static final Property<Auditable2> PARENT = new Property<Auditable2>("parent");
+    public static final Property<String> CHAR_PROPERTY1 = Property.create("charProperty1", String.class);
+    public static final Property<String> CHAR_PROPERTY2 = Property.create("charProperty2", String.class);
+    public static final Property<Auditable2> PARENT = Property.create("parent", Auditable2.class);
 
     public void setCharProperty1(String charProperty1) {
         writeProperty("charProperty1", charProperty1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChildUuid.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChildUuid.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChildUuid.java
index c4fca2d..d269c8a 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChildUuid.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChildUuid.java
@@ -15,9 +15,9 @@ public abstract class _AuditableChildUuid extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> CHAR_PROPERTY1 = new Property<String>("charProperty1");
-    public static final Property<String> CHAR_PROPERTY2 = new Property<String>("charProperty2");
-    public static final Property<String> UUID = new Property<String>("uuid");
+    public static final Property<String> CHAR_PROPERTY1 = Property.create("charProperty1", String.class);
+    public static final Property<String> CHAR_PROPERTY2 = Property.create("charProperty2", String.class);
+    public static final Property<String> UUID = Property.create("uuid", String.class);
 
     public void setCharProperty1(String charProperty1) {
         writeProperty("charProperty1", charProperty1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java
index d9004c0..2bc35b9 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java
@@ -18,7 +18,7 @@ public abstract class _E3 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<List<E4>> E4S = new Property<List<E4>>("e4s");
+    public static final Property<List<E4>> E4S = Property.create("e4s", List.class);
 
     public void addToE4s(E4 obj) {
         addToManyTarget("e4s", obj, true);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java
index 732e532..42ea901 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java
@@ -18,7 +18,7 @@ public abstract class _E4 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<List<E3>> E3S = new Property<List<E3>>("e3s");
+    public static final Property<List<E3>> E3S = Property.create("e3s", List.class);
 
     public void addToE3s(E3 obj) {
         addToManyTarget("e3s", obj, true);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortDep.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortDep.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortDep.java
index af4238a..83b82d6 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortDep.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortDep.java
@@ -16,7 +16,7 @@ public abstract class _SortDep extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<SortRoot> ROOT = new Property<SortRoot>("root");
+    public static final Property<SortRoot> ROOT = Property.create("root", SortRoot.class);
 
     public void setRoot(SortRoot root) {
         setToOneTarget("root", root, true);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortRoot.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortRoot.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortRoot.java
index 9a72da7..45991ee 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortRoot.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_SortRoot.java
@@ -18,7 +18,7 @@ public abstract class _SortRoot extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<List<SortDep>> DEPS = new Property<List<SortDep>>("deps");
+    public static final Property<List<SortDep>> DEPS = Property.create("deps", List.class);
 
     public void addToDeps(SortDep obj) {
         addToManyTarget("deps", obj, true);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_UuidRoot1.java
----------------------------------------------------------------------
diff --git a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_UuidRoot1.java b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_UuidRoot1.java
index cd491cd..a9ad9bc 100644
--- a/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_UuidRoot1.java
+++ b/cayenne-lifecycle/src/test/java/org/apache/cayenne/lifecycle/db/auto/_UuidRoot1.java
@@ -15,7 +15,7 @@ public abstract class _UuidRoot1 extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> UUID = new Property<String>("uuid");
+    public static final Property<String> UUID = Property.create("uuid", String.class);
 
     public void setUuid(String uuid) {
         writeProperty("uuid", uuid);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable1.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable1.java b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable1.java
index edc4630..b512ac0 100644
--- a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable1.java
+++ b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable1.java
@@ -22,13 +22,13 @@ public abstract class _MtTable1 extends CayenneDataObject {
 
     public static final String TABLE1_ID_PK_COLUMN = "TABLE1_ID";
 
-    public static final Property<LocalDate> DATE_ATTRIBUTE = new Property<LocalDate>("dateAttribute");
-    public static final Property<String> GLOBAL_ATTRIBUTE = new Property<String>("globalAttribute");
-    public static final Property<Date> OLD_DATE_ATTRIBUTE = new Property<Date>("oldDateAttribute");
-    public static final Property<String> SERVER_ATTRIBUTE = new Property<String>("serverAttribute");
-    public static final Property<LocalTime> TIME_ATTRIBUTE = new Property<LocalTime>("timeAttribute");
-    public static final Property<LocalDateTime> TIMESTAMP_ATTRIBUTE = new Property<LocalDateTime>("timestampAttribute");
-    public static final Property<List<MtTable2>> TABLE2ARRAY = new Property<List<MtTable2>>("table2Array");
+    public static final Property<LocalDate> DATE_ATTRIBUTE = Property.create("dateAttribute", LocalDate.class);
+    public static final Property<String> GLOBAL_ATTRIBUTE = Property.create("globalAttribute", String.class);
+    public static final Property<Date> OLD_DATE_ATTRIBUTE = Property.create("oldDateAttribute", Date.class);
+    public static final Property<String> SERVER_ATTRIBUTE = Property.create("serverAttribute", String.class);
+    public static final Property<LocalTime> TIME_ATTRIBUTE = Property.create("timeAttribute", LocalTime.class);
+    public static final Property<LocalDateTime> TIMESTAMP_ATTRIBUTE = Property.create("timestampAttribute", LocalDateTime.class);
+    public static final Property<List<MtTable2>> TABLE2ARRAY = Property.create("table2Array", List.class);
 
     public void setDateAttribute(LocalDate dateAttribute) {
         writeProperty("dateAttribute", dateAttribute);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable2.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable2.java b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable2.java
index db226a8..68ab205 100644
--- a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable2.java
+++ b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/persistent/auto/_MtTable2.java
@@ -16,8 +16,8 @@ public abstract class _MtTable2 extends CayenneDataObject {
 
     public static final String TABLE2_ID_PK_COLUMN = "TABLE2_ID";
 
-    public static final Property<String> GLOBAL_ATTRIBUTE = new Property<String>("globalAttribute");
-    public static final Property<MtTable1> TABLE1 = new Property<MtTable1>("table1");
+    public static final Property<String> GLOBAL_ATTRIBUTE = Property.create("globalAttribute", String.class);
+    public static final Property<MtTable1> TABLE1 = Property.create("table1", MtTable1.class);
 
     public void setGlobalAttribute(String globalAttribute) {
         writeProperty("globalAttribute", globalAttribute);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
index f9ee738..147f9f7 100644
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
+++ b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
@@ -19,9 +19,9 @@ public abstract class _Artist extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<LocalDate> DATE_OF_BIRTH = new Property<LocalDate>("dateOfBirth");
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<Painting>> PAINTINGS = new Property<List<Painting>>("paintings");
+    public static final Property<LocalDate> DATE_OF_BIRTH = Property.create("dateOfBirth", LocalDate.class);
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     public void setDateOfBirth(LocalDate dateOfBirth) {
         writeProperty("dateOfBirth", dateOfBirth);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
index bac8eb9..d4ed6aa 100644
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
+++ b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
@@ -18,8 +18,8 @@ public abstract class _Gallery 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<Painting>> PAINTINGS = new Property<List<Painting>>("paintings");
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
index 876ad07..0c39d79 100644
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
+++ b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
@@ -17,9 +17,9 @@ public abstract class _Painting extends CayenneDataObject {
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<Artist> ARTIST = new Property<Artist>("artist");
-    public static final Property<Gallery> GALLERY = new Property<Gallery>("gallery");
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<Artist> ARTIST = Property.create("artist", Artist.class);
+    public static final Property<Gallery> GALLERY = Property.create("gallery", Gallery.class);
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
index d98d444..b478b8d 100644
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
+++ b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
@@ -15,9 +15,9 @@ import org.apache.cayenne.util.PersistentObjectList;
  */
 public abstract class _Artist extends PersistentObject {
 
-    public static final Property<LocalDate> DATE_OF_BIRTH = new Property<LocalDate>("dateOfBirth");
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<Painting>> PAINTINGS = new Property<List<Painting>>("paintings");
+    public static final Property<LocalDate> DATE_OF_BIRTH = Property.create("dateOfBirth", LocalDate.class);
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     protected LocalDate dateOfBirth;
     protected String name;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
index 6189902..7c59c64 100644
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
+++ b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
@@ -14,8 +14,8 @@ import org.apache.cayenne.util.PersistentObjectList;
  */
 public abstract class _Gallery extends PersistentObject {
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<Painting>> PAINTINGS = new Property<List<Painting>>("paintings");
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     protected String name;
     protected List<Painting> paintings;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
index 23c14e2..ab004f9 100644
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
+++ b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
@@ -14,9 +14,9 @@ import org.apache.cayenne.util.PersistentObjectHolder;
  */
 public abstract class _Painting extends PersistentObject {
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<Artist> ARTIST = new Property<Artist>("artist");
-    public static final Property<Gallery> GALLERY = new Property<Gallery>("gallery");
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<Artist> ARTIST = Property.create("artist", Artist.class);
+    public static final Property<Gallery> GALLERY = Property.create("gallery", Gallery.class);
 
     protected String name;
     protected ValueHolder artist;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
index 1cb2efd..93797c8 100644
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
+++ b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
@@ -15,18 +15,13 @@ import org.apache.cayenne.tutorial.persistent.Painting;
  */
 public abstract class _Artist extends CayenneDataObject {
 
-    @Deprecated
-    public static final String DATE_OF_BIRTH_PROPERTY = "dateOfBirth";
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String PAINTINGS_PROPERTY = "paintings";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<Date> DATE_OF_BIRTH = new Property<Date>("dateOfBirth");
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<Painting>> PAINTINGS = new Property<List<Painting>>("paintings");
+    public static final Property<Date> DATE_OF_BIRTH = Property.create("dateOfBirth", Date.class);
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     public void setDateOfBirth(Date dateOfBirth) {
         writeProperty("dateOfBirth", dateOfBirth);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
index 7c4c209..d4ed6aa 100644
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
+++ b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
@@ -14,15 +14,12 @@ import org.apache.cayenne.tutorial.persistent.Painting;
  */
 public abstract class _Gallery extends CayenneDataObject {
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String PAINTINGS_PROPERTY = "paintings";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<Painting>> PAINTINGS = new Property<List<Painting>>("paintings");
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
index 632bd11..0c39d79 100644
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
+++ b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
@@ -13,18 +13,13 @@ import org.apache.cayenne.tutorial.persistent.Gallery;
  */
 public abstract class _Painting extends CayenneDataObject {
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String ARTIST_PROPERTY = "artist";
-    @Deprecated
-    public static final String GALLERY_PROPERTY = "gallery";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<Artist> ARTIST = new Property<Artist>("artist");
-    public static final Property<Gallery> GALLERY = new Property<Gallery>("gallery");
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<Artist> ARTIST = Property.create("artist", Artist.class);
+    public static final Property<Gallery> GALLERY = Property.create("gallery", Gallery.class);
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
index ef01c47..0856981 100644
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
+++ b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
@@ -4,7 +4,9 @@ import java.util.Date;
 import java.util.List;
 
 import org.apache.cayenne.PersistentObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.tutorial.persistent.client.Painting;
+import org.apache.cayenne.util.PersistentObjectList;
 
 /**
  * A generated persistent class mapped as "Artist" Cayenne entity. It is a good idea to
@@ -13,9 +15,9 @@ import org.apache.cayenne.tutorial.persistent.client.Painting;
  */
 public abstract class _Artist extends PersistentObject {
 
-    public static final String DATE_OF_BIRTH_PROPERTY = "dateOfBirth";
-    public static final String NAME_PROPERTY = "name";
-    public static final String PAINTINGS_PROPERTY = "paintings";
+    public static final Property<Date> DATE_OF_BIRTH = Property.create("dateOfBirth", Date.class);
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     protected Date dateOfBirth;
     protected String name;
@@ -34,12 +36,12 @@ public abstract class _Artist extends PersistentObject {
         }
 
         Object oldValue = this.dateOfBirth;
-        this.dateOfBirth = dateOfBirth;
-
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "dateOfBirth", oldValue, dateOfBirth);
         }
+        
+        this.dateOfBirth = dateOfBirth;
     }
 
     public String getName() {
@@ -55,32 +57,38 @@ public abstract class _Artist extends PersistentObject {
         }
 
         Object oldValue = this.name;
-        this.name = name;
-
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "name", oldValue, name);
         }
+        
+        this.name = name;
     }
 
     public List<Painting> getPaintings() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "paintings", true);
-        }
+        } else if (this.paintings == null) {
+        	this.paintings = new PersistentObjectList(this, "paintings");
+		}
 
         return paintings;
     }
     public void addToPaintings(Painting object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "paintings", true);
-        }
+        } else if (this.paintings == null) {
+        	this.paintings = new PersistentObjectList(this, "paintings");
+		}
 
         this.paintings.add(object);
     }
     public void removeFromPaintings(Painting object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "paintings", true);
-        }
+        } else if (this.paintings == null) {
+        	this.paintings = new PersistentObjectList(this, "paintings");
+		}
 
         this.paintings.remove(object);
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
index 1c98afa..7c59c64 100644
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
+++ b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
@@ -3,7 +3,9 @@ package org.apache.cayenne.tutorial.persistent.client.auto;
 import java.util.List;
 
 import org.apache.cayenne.PersistentObject;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.tutorial.persistent.client.Painting;
+import org.apache.cayenne.util.PersistentObjectList;
 
 /**
  * A generated persistent class mapped as "Gallery" Cayenne entity. It is a good idea to
@@ -12,8 +14,8 @@ import org.apache.cayenne.tutorial.persistent.client.Painting;
  */
 public abstract class _Gallery extends PersistentObject {
 
-    public static final String NAME_PROPERTY = "name";
-    public static final String PAINTINGS_PROPERTY = "paintings";
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     protected String name;
     protected List<Painting> paintings;
@@ -31,32 +33,38 @@ public abstract class _Gallery extends PersistentObject {
         }
 
         Object oldValue = this.name;
-        this.name = name;
-
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "name", oldValue, name);
         }
+        
+        this.name = name;
     }
 
     public List<Painting> getPaintings() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "paintings", true);
-        }
+        } else if (this.paintings == null) {
+        	this.paintings = new PersistentObjectList(this, "paintings");
+		}
 
         return paintings;
     }
     public void addToPaintings(Painting object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "paintings", true);
-        }
+        } else if (this.paintings == null) {
+        	this.paintings = new PersistentObjectList(this, "paintings");
+		}
 
         this.paintings.add(object);
     }
     public void removeFromPaintings(Painting object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "paintings", true);
-        }
+        } else if (this.paintings == null) {
+        	this.paintings = new PersistentObjectList(this, "paintings");
+		}
 
         this.paintings.remove(object);
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
index 91f0120..1671057 100644
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
+++ b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
@@ -2,8 +2,10 @@ package org.apache.cayenne.tutorial.persistent.client.auto;
 
 import org.apache.cayenne.PersistentObject;
 import org.apache.cayenne.ValueHolder;
+import org.apache.cayenne.exp.Property;
 import org.apache.cayenne.tutorial.persistent.client.Artist;
 import org.apache.cayenne.tutorial.persistent.client.Gallery;
+import org.apache.cayenne.util.PersistentObjectHolder;
 
 /**
  * A generated persistent class mapped as "Painting" Cayenne entity. It is a good idea to
@@ -12,9 +14,9 @@ import org.apache.cayenne.tutorial.persistent.client.Gallery;
  */
 public abstract class _Painting extends PersistentObject {
 
-    public static final String NAME_PROPERTY = "name";
-    public static final String ARTIST_PROPERTY = "artist";
-    public static final String GALLERY_PROPERTY = "gallery";
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<org.apache.cayenne.tutorial.persistent.Artist> ARTIST = Property.create("artist", org.apache.cayenne.tutorial.persistent.Artist.class);
+    public static final Property<org.apache.cayenne.tutorial.persistent.Gallery> GALLERY = Property.create("gallery", org.apache.cayenne.tutorial.persistent.Gallery.class);
 
     protected String name;
     protected ValueHolder artist;
@@ -33,41 +35,63 @@ public abstract class _Painting extends PersistentObject {
         }
 
         Object oldValue = this.name;
-        this.name = name;
-
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "name", oldValue, name);
         }
+        
+        this.name = name;
     }
 
     public Artist getArtist() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "artist", true);
-        }
+        } else if (this.artist == null) {
+        	this.artist = new PersistentObjectHolder(this, "artist");
+		}
 
         return (Artist) artist.getValue();
     }
     public void setArtist(Artist artist) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "artist", true);
-        }
+        } else if (this.artist == null) {
+        	this.artist = new PersistentObjectHolder(this, "artist");
+		}
 
+        // note how we notify ObjectContext of change BEFORE the object is actually
+        // changed... this is needed to take a valid current snapshot
+        Object oldValue = this.artist.getValueDirectly();
+        if (objectContext != null) {
+        	objectContext.propertyChanged(this, "artist", oldValue, artist);
+        }
+        
         this.artist.setValue(artist);
     }
 
     public Gallery getGallery() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "gallery", true);
-        }
+        } else if (this.gallery == null) {
+        	this.gallery = new PersistentObjectHolder(this, "gallery");
+		}
 
         return (Gallery) gallery.getValue();
     }
     public void setGallery(Gallery gallery) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "gallery", true);
-        }
+        } else if (this.gallery == null) {
+        	this.gallery = new PersistentObjectHolder(this, "gallery");
+		}
 
+        // note how we notify ObjectContext of change BEFORE the object is actually
+        // changed... this is needed to take a valid current snapshot
+        Object oldValue = this.gallery.getValueDirectly();
+        if (objectContext != null) {
+        	objectContext.propertyChanged(this, "gallery", oldValue, gallery);
+        }
+        
         this.gallery.setValue(gallery);
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server/src/main/resources/cayenne-project.xml
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server/src/main/resources/cayenne-project.xml b/tutorials/tutorial-rop-server/src/main/resources/cayenne-project.xml
index 5957e5c..1c7f367 100644
--- a/tutorials/tutorial-rop-server/src/main/resources/cayenne-project.xml
+++ b/tutorials/tutorial-rop-server/src/main/resources/cayenne-project.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<domain project-version="7">
+<domain project-version="9">
 	<map name="datamap"/>
 
 	<node name="datanode"

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial-rop-server/src/main/resources/datamap.map.xml
----------------------------------------------------------------------
diff --git a/tutorials/tutorial-rop-server/src/main/resources/datamap.map.xml b/tutorials/tutorial-rop-server/src/main/resources/datamap.map.xml
index 466cd06..8edf4d2 100644
--- a/tutorials/tutorial-rop-server/src/main/resources/datamap.map.xml
+++ b/tutorials/tutorial-rop-server/src/main/resources/datamap.map.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/7/modelMap"
+<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/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
-	 project-version="7">
+	 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.tutorial.persistent"/>
 	<property name="clientSupported" value="true"/>
 	<property name="defaultClientPackage" value="org.apache.cayenne.tutorial.persistent.client"/>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java b/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
index 1cb2efd..93797c8 100644
--- a/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
+++ b/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
@@ -15,18 +15,13 @@ import org.apache.cayenne.tutorial.persistent.Painting;
  */
 public abstract class _Artist extends CayenneDataObject {
 
-    @Deprecated
-    public static final String DATE_OF_BIRTH_PROPERTY = "dateOfBirth";
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String PAINTINGS_PROPERTY = "paintings";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<Date> DATE_OF_BIRTH = new Property<Date>("dateOfBirth");
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<Painting>> PAINTINGS = new Property<List<Painting>>("paintings");
+    public static final Property<Date> DATE_OF_BIRTH = Property.create("dateOfBirth", Date.class);
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     public void setDateOfBirth(Date dateOfBirth) {
         writeProperty("dateOfBirth", dateOfBirth);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java b/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
index 7c4c209..d4ed6aa 100644
--- a/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
+++ b/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
@@ -14,15 +14,12 @@ import org.apache.cayenne.tutorial.persistent.Painting;
  */
 public abstract class _Gallery extends CayenneDataObject {
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String PAINTINGS_PROPERTY = "paintings";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<List<Painting>> PAINTINGS = new Property<List<Painting>>("paintings");
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<List<Painting>> PAINTINGS = Property.create("paintings", List.class);
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
----------------------------------------------------------------------
diff --git a/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java b/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
index 632bd11..0c39d79 100644
--- a/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
+++ b/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
@@ -13,18 +13,13 @@ import org.apache.cayenne.tutorial.persistent.Gallery;
  */
 public abstract class _Painting extends CayenneDataObject {
 
-    @Deprecated
-    public static final String NAME_PROPERTY = "name";
-    @Deprecated
-    public static final String ARTIST_PROPERTY = "artist";
-    @Deprecated
-    public static final String GALLERY_PROPERTY = "gallery";
+    private static final long serialVersionUID = 1L; 
 
     public static final String ID_PK_COLUMN = "ID";
 
-    public static final Property<String> NAME = new Property<String>("name");
-    public static final Property<Artist> ARTIST = new Property<Artist>("artist");
-    public static final Property<Gallery> GALLERY = new Property<Gallery>("gallery");
+    public static final Property<String> NAME = Property.create("name", String.class);
+    public static final Property<Artist> ARTIST = Property.create("artist", Artist.class);
+    public static final Property<Gallery> GALLERY = Property.create("gallery", Gallery.class);
 
     public void setName(String name) {
         writeProperty("name", name);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial/src/main/resources/cayenne-project.xml
----------------------------------------------------------------------
diff --git a/tutorials/tutorial/src/main/resources/cayenne-project.xml b/tutorials/tutorial/src/main/resources/cayenne-project.xml
index 5957e5c..1c7f367 100644
--- a/tutorials/tutorial/src/main/resources/cayenne-project.xml
+++ b/tutorials/tutorial/src/main/resources/cayenne-project.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<domain project-version="7">
+<domain project-version="9">
 	<map name="datamap"/>
 
 	<node name="datanode"

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f75229be/tutorials/tutorial/src/main/resources/datamap.map.xml
----------------------------------------------------------------------
diff --git a/tutorials/tutorial/src/main/resources/datamap.map.xml b/tutorials/tutorial/src/main/resources/datamap.map.xml
index 4875f89..bcd43b8 100644
--- a/tutorials/tutorial/src/main/resources/datamap.map.xml
+++ b/tutorials/tutorial/src/main/resources/datamap.map.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/7/modelMap"
+<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/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
-	 project-version="7">
+	 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.tutorial.persistent"/>
 	<db-entity name="ARTIST">
 		<db-attribute name="DATE_OF_BIRTH" type="DATE"/>