You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by ab...@apache.org on 2019/04/11 14:27:51 UTC
[cayenne] branch STABLE-4.1 updated: CAY-2564 No import for
Property after generation classes with pk properties
This is an automated email from the ASF dual-hosted git repository.
abulatski pushed a commit to branch STABLE-4.1
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/STABLE-4.1 by this push:
new 671f195 CAY-2564 No import for Property after generation classes with pk properties
671f195 is described below
commit 671f1954f8ee6a4ec3b35793f35b931b3918f874
Author: Arseni Bulatski <an...@gmail.com>
AuthorDate: Thu Apr 11 17:26:39 2019 +0300
CAY-2564 No import for Property after generation classes with pk properties
---
RELEASE-NOTES.txt | 1 +
cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 815be18..d81100a 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -15,6 +15,7 @@ Bug Fixes:
CAY-2550 Modeler: ObjAttribute inspector modifies wrong columns in attribute table
CAY-2559 Modeler: Warning dialog shows wrong information after changing target entity in dbRelationship
CAY-2561 Modeler: cgen type combobox doesn't set templates
+CAY-2564 No import for Property after generation classes with pk properties
----------------------------------
Release: 4.1.B1
diff --git a/cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm b/cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm
index a1bbd58..5869a87 100644
--- a/cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm
+++ b/cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm
@@ -44,7 +44,9 @@ ${importUtils.addType("java.io.ObjectOutputStream")}##
#if( $createPKProperties )
${importUtils.addType("org.apache.cayenne.exp.ExpressionFactory")}##
#end
-#if((${object.DeclaredAttributes} && !${object.DeclaredAttributes.isEmpty()}) || (${object.DeclaredRelationships} && !${object.DeclaredRelationships.isEmpty()}))
+#if((${object.DeclaredAttributes} && !${object.DeclaredAttributes.isEmpty()}) ||
+ (${object.DeclaredRelationships} && !${object.DeclaredRelationships.isEmpty()}) ||
+ $createPKProperties)
${importUtils.addType('org.apache.cayenne.exp.Property')}##
#end
#foreach( $attr in ${object.DeclaredAttributes} )