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/24 15:13:34 UTC
[cayenne] branch master updated (598eb371e -> f732f1844)
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git
from 598eb371e Merge pull request #540 from m-dzianishchyts/CAY-2764
new 348a13237 CAY-2780 and CAY-2764 release notes
new f732f1844 CAY-2781 Enable 'Create PK properties' by default in the cgen configuration
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
RELEASE-NOTES.txt | 3 +++
.../main/java/org/apache/cayenne/gen/CgenConfiguration.java | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
[cayenne] 01/02: CAY-2780 and CAY-2764 release notes
Posted by nt...@apache.org.
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 348a13237783b4268dff321aa9251f5b16a416e0
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Thu Nov 24 17:55:08 2022 +0300
CAY-2780 and CAY-2764 release notes
---
RELEASE-NOTES.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index d1795edf4..2c3510f85 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -32,10 +32,12 @@ CAY-2766 Modeler: Improving the work with velocity templates for class generatio
CAY-2767 Modeler: upgrade deprecated code in custom components
CAY-2773 Switch master to "5.0"
CAY-2776 Upgrade Gradle to 7.6
+CAY-2780 Modeler: Multiple configurations for classes generation
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-2764 Split expressions do not work with DB relationships
CAY-2765 dbimport: check excluded catalogs and schemas for the SQLServer
CAY-2774 Overriding service ordering in DI List causes DIRuntimeException
[cayenne] 02/02: CAY-2781 Enable 'Create PK properties' by default in the cgen configuration
Posted by nt...@apache.org.
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 f732f18442179d66a45e62842eaa7db3a1009190
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Thu Nov 24 18:13:28 2022 +0300
CAY-2781 Enable 'Create PK properties' by default in the cgen configuration
---
RELEASE-NOTES.txt | 1 +
.../main/java/org/apache/cayenne/gen/CgenConfiguration.java | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 2c3510f85..80bbaf38b 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -33,6 +33,7 @@ CAY-2767 Modeler: upgrade deprecated code in custom components
CAY-2773 Switch master to "5.0"
CAY-2776 Upgrade Gradle to 7.6
CAY-2780 Modeler: Multiple configurations for classes generation
+CAY-2781 Enable 'Create PK properties' by default in the cgen configuration
Bug Fixes:
diff --git a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/CgenConfiguration.java b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/CgenConfiguration.java
index 221b1adff..92a827735 100644
--- a/cayenne-cgen/src/main/java/org/apache/cayenne/gen/CgenConfiguration.java
+++ b/cayenne-cgen/src/main/java/org/apache/cayenne/gen/CgenConfiguration.java
@@ -93,21 +93,21 @@ public class CgenConfiguration implements Serializable, XMLSerializable {
public CgenConfiguration() {
this.name = CgenConfigList.DEFAULT_CONFIG_NAME;
- /*
+ /**
* {@link #isDefault()} method should be in sync with the following values
*/
this.outputPattern = "*.java";
this.timestamp = 0L;
this.usePkgPath = true;
this.makePairs = true;
- setArtifactsGenerationMode("entity");
+ this.createPKProperties = true;
+ this.artifactsGenerationMode = ArtifactsGenerationMode.ENTITY;
this.artifacts = new ArrayList<>();
this.entityArtifacts = new HashSet<>();
this.excludeEntityArtifacts = new ArrayList<>();
this.embeddableArtifacts = new HashSet<>();
this.excludeEmbeddableArtifacts = new ArrayList<>();
- this.artifactsGenerationMode = ArtifactsGenerationMode.ENTITY;
this.template = TemplateType.ENTITY_SUBCLASS.defaultTemplate();
this.superTemplate = TemplateType.ENTITY_SUPERCLASS.defaultTemplate();
@@ -446,10 +446,10 @@ public class CgenConfiguration implements Serializable, XMLSerializable {
*/
public boolean isDefault() {
// this must be is sync with actual default values
- return isMakePairs()
+ return makePairs
&& usePkgPath
&& !overwrite
- && !createPKProperties
+ && createPKProperties
&& !createPropertyNames
&& "*.java".equals(outputPattern)
&& template.equals(TemplateType.ENTITY_SUBCLASS.defaultTemplate())