You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2020/10/03 07:39:43 UTC
[cayenne] 01/02: CAY-2682 Vertical Inheritance: DB-generated PK
doesn't propagate from the root to children
This is an automated email from the ASF dual-hosted git repository.
aadamchik pushed a commit to branch STABLE-4.1
in repository https://gitbox.apache.org/repos/asf/cayenne.git
commit 9afbfd99c0fca97fc21d3b84bca2e1f7253c248b
Author: Andrus Adamchik <an...@objectstyle.com>
AuthorDate: Sat Oct 3 10:34:33 2020 +0300
CAY-2682 Vertical Inheritance: DB-generated PK doesn't propagate from the root to children
* unrolling the previous PR. It causes some issues in our tests
* keeping the tests
---
RELEASE-NOTES.txt | 1 -
.../main/java/org/apache/cayenne/access/DataDomainDBDiffBuilder.java | 2 +-
.../main/java/org/apache/cayenne/access/DataDomainInsertBucket.java | 3 ---
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index ad24b4f..9542257 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -17,7 +17,6 @@ Bug Fixes:
CAY-2670 CommitLog does not include FKs for deleted objects with one-way relationships
CAY-2679 Unstable ordering of relationships in the .map.xml file
CAY-2681 Modeler: All selected checkboxes cause project to become dirty at initialization
-CAY-2682 Vertical Inheritance: DB-generated PK doesn't propagate from the root to children
----------------------------------
Release: 4.1
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainDBDiffBuilder.java b/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainDBDiffBuilder.java
index 507a752..373334f 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainDBDiffBuilder.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainDBDiffBuilder.java
@@ -86,8 +86,8 @@ class DataDomainDBDiffBuilder implements GraphChangeHandler {
Map<String, Object> dbDiff = new HashMap<>();
appendSimpleProperties(dbDiff);
- appendPrimaryKeys(dbDiff);
appendForeignKeys(dbDiff);
+ appendPrimaryKeys(dbDiff);
return dbDiff.isEmpty() ? null : dbDiff;
}
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java b/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java
index 89b1857..e2b8500 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java
@@ -154,9 +154,6 @@ class DataDomainInsertBucket extends DataDomainSyncBucket {
// skip propagated
if (isPropagated(dbAttr)) {
- // this covers rare case of the DB-generated flattened PK,
- // for normal propagated PK this will be overwritten by the arc diff later
- idMap.put(dbAttrName, new PropagatedValueFactory(id, dbAttrName));
continue;
}