cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [cayenne] 06/06: CAY-2571 DataDomainFlushAction redesign cleanup
Date Wed, 24 Apr 2019 14:54:03 GMT
This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git

commit cbb96b1e3c0b2bbdd16fcefcda0d1f6469b0f0a0
Author: Nikita Timofeev <stariy95@gmail.com>
AuthorDate: Wed Apr 24 17:53:27 2019 +0300

    CAY-2571 DataDomainFlushAction redesign
    cleanup
---
 .../access/flush/DataDomainIndirectDiffBuilder.java    |  2 ++
 .../org/apache/cayenne/access/flush/EffectiveOpId.java |  1 +
 .../cayenne/configuration/server/ServerModule.java     |  1 -
 .../access/DataContextFlattenedAttributesIT.java       | 18 +-----------------
 4 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/flush/DataDomainIndirectDiffBuilder.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/flush/DataDomainIndirectDiffBuilder.java
index 65e4190..078dfd5 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/flush/DataDomainIndirectDiffBuilder.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/flush/DataDomainIndirectDiffBuilder.java
@@ -34,6 +34,8 @@ import org.apache.cayenne.map.ObjRelationship;
 /**
  * A processor of ObjectStore indirect changes, such as flattened relationships
  * and to-many relationships.
+ *
+ * @since 4.2
  */
 final class DataDomainIndirectDiffBuilder implements GraphChangeHandler {
 
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/flush/EffectiveOpId.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/flush/EffectiveOpId.java
index c906c08..b3d2ec7 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/flush/EffectiveOpId.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/flush/EffectiveOpId.java
@@ -27,6 +27,7 @@ import org.apache.cayenne.ObjectId;
  * Helper value-object class that used to compare operations by "effective" id (i.e. by id
snapshot,
  * that will include replacement id if any).
  * This class is not used directly by Cayenne, it's designed to ease custom implementations.
+ * @since 4.2
  */
 @SuppressWarnings("unused")
 public class EffectiveOpId {
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
index bdeb97f..1854d89 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
@@ -29,7 +29,6 @@ import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.access.DataRowStoreFactory;
 import org.apache.cayenne.access.DefaultDataRowStoreFactory;
 import org.apache.cayenne.access.DefaultObjectMapRetainStrategy;
-import org.apache.cayenne.access.LegacyDataDomainFlushActionFactory;
 import org.apache.cayenne.access.ObjectMapRetainStrategy;
 import org.apache.cayenne.access.dbsync.DefaultSchemaUpdateStrategyFactory;
 import org.apache.cayenne.access.dbsync.SchemaUpdateStrategyFactory;
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesIT.java
index c3f2bed..24b7922 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesIT.java
@@ -26,7 +26,6 @@ import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.query.EJBQLQuery;
-import org.apache.cayenne.query.ObjectSelect;
 import org.apache.cayenne.query.SelectById;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.reflect.PersistentDescriptor;
@@ -116,21 +115,6 @@ public class DataContextFlattenedAttributesIT extends ServerCase {
     }
 
     @Test
-    public void testSelect() throws Exception {
-        createTestDataSet();
-
-        CompoundPainting result = ObjectSelect
-                .query(CompoundPainting.class)
-                .orderBy(CompoundPainting.PAINTING_ID_PK_PROPERTY.asc())
-                .selectFirst(context);
-
-        assertNotNull(result);
-
-        result.setArtistName("new A");
-        context.commitChanges();
-    }
-
-    @Test
     public void testSelectCompound1() throws Exception {
         createTestDataSet();
         SelectQuery<CompoundPainting> query = SelectQuery.query(CompoundPainting.class);
@@ -414,7 +398,7 @@ public class DataContextFlattenedAttributesIT extends ServerCase {
             o1.setTextReview("T1");
 
             context1.commitChanges();
-            id = o1.getObjectId().getIdSnapshot().get(CompoundPainting.PAINTING_ID_PK_COLUMN);
+            id = Cayenne.pkForObject(o1);
         }
 
         {


Mime
View raw message