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 fa5ef7e986bbd8f9e672fe6356a9134eeaa94452 Author: Mikhail Dzianishchyts <mikhail.dzianishch...@gmail.com> AuthorDate: Tue Nov 8 17:33:38 2022 +0400 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 28b4852fc..86be3dbbd 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -71,6 +71,7 @@ CAY-2762 Modeler: Difference in toolbars colors on OSX CAY-2763 Split expressions do not work with flattened relationships CAY-2764 Split expressions do not work with DB relationships CAY-2765 dbimport: check excluded catalogs and schemas for the SQLServer +CAY-2769 Modeler: 'rootPath' attribute is missing CAY-2774 Overriding service ordering in DI List causes DIRuntimeException CAY-2777 Reverse relationship is not set with single table inheritance CAY-2782 Modeler: save button becomes active on DataMap comment field focus 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 cd76e0a64..e81c8a88f 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));