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 2022/11/09 07:32:27 UTC
[cayenne] branch STABLE-4.2 updated: CAY-2769 Modeler: 'rootPath' attribute is missing
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch STABLE-4.2
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/STABLE-4.2 by this push:
new 059b05b05 CAY-2769 Modeler: 'rootPath' attribute is missing
new 7b85372ba Merge pull request #531 from m-dzianishchyts/CAY-2769
059b05b05 is described below
commit 059b05b059fd5af51dc94a5bb7d223f736797c69
Author: Mikhail Dzianishchyts <mi...@gmail.com>
AuthorDate: Tue Nov 8 16:33:38 2022 +0300
CAY-2769 Modeler: 'rootPath' attribute is missing
---
RELEASE-NOTES.txt | 1 +
.../src/main/java/org/apache/cayenne/project/FileProjectSaver.java | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 917d40096..c57426f6b 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -23,6 +23,7 @@ Bug Fixes:
CAY-2755 Modeler: Entities are not sorted by name in the class generation view
CAY-2762 Modeler: Difference in toolbars colors on OSX
CAY-2765 dbimport: check excluded catalogs and schemas for the SQLServer
+CAY-2769 Modeler: 'rootPath' attribute is missing
----------------------------------
Release: 4.2.RC1
diff --git a/cayenne-project/src/main/java/org/apache/cayenne/project/FileProjectSaver.java b/cayenne-project/src/main/java/org/apache/cayenne/project/FileProjectSaver.java
index 95f1132b0..02c53b0a2 100644
--- a/cayenne-project/src/main/java/org/apache/cayenne/project/FileProjectSaver.java
+++ b/cayenne-project/src/main/java/org/apache/cayenne/project/FileProjectSaver.java
@@ -23,6 +23,7 @@ import org.apache.cayenne.configuration.ConfigurationNameMapper;
import org.apache.cayenne.configuration.ConfigurationNode;
import org.apache.cayenne.configuration.ConfigurationNodeVisitor;
import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.map.DataMap;
import org.apache.cayenne.project.extension.ProjectExtension;
import org.apache.cayenne.project.extension.SaverDelegate;
import org.apache.cayenne.resource.Resource;
@@ -101,6 +102,12 @@ public class FileProjectSaver implements ProjectSaver {
for(ConfigurationNode node : nodes) {
String targetLocation = nameMapper.configurationLocation(node);
+
+ if (node instanceof DataMap) {
+ DataMap dataMapNode = ((DataMap) node);
+ dataMapNode.setLocation(targetLocation);
+ }
+
Resource targetResource = baseResource.getRelativeResource(targetLocation);
units.add(createSaveUnit(node, targetResource, null));