Repository: cayenne Updated Branches: refs/heads/master 7b5d73e4e -> da720a59c
CAY-2478 cgen: Generate properties for PK correct DB path expression Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/da720a59 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/da720a59 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/da720a59 Branch: refs/heads/master Commit: da720a59ce90e8b1cc7e8d7b344b5d143e3bd8ea Parents: 7b5d73e Author: Nikita Timofeev <stari...@gmail.com> Authored: Fri Oct 19 15:29:11 2018 +0300 Committer: Nikita Timofeev <stari...@gmail.com> Committed: Fri Oct 19 15:29:11 2018 +0300 ---------------------------------------------------------------------- cayenne-cgen/src/main/resources/templates/v4_1/singleclass.vm | 2 +- cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne/blob/da720a59/cayenne-cgen/src/main/resources/templates/v4_1/singleclass.vm ---------------------------------------------------------------------- diff --git a/cayenne-cgen/src/main/resources/templates/v4_1/singleclass.vm b/cayenne-cgen/src/main/resources/templates/v4_1/singleclass.vm index 32ae64a..0f4d3e7 100644 --- a/cayenne-cgen/src/main/resources/templates/v4_1/singleclass.vm +++ b/cayenne-cgen/src/main/resources/templates/v4_1/singleclass.vm @@ -79,7 +79,7 @@ public#if("true" == "${object.isAbstract()}") abstract#end class ${subClassName} #foreach( $idAttr in ${object.DbEntity.PrimaryKeys} ) #if( $createPKProperties && !${entityUtils.declaresDbAttribute($idAttr)}) #set ( $type = "$importUtils.dbAttributeToJavaType($idAttr)") - public static final Property<$type> ${stringUtils.capitalizedAsConstant($idAttr.Name)}_PK_COLUMN = Property.create(ExpressionFactory.dbPathExp("db:${idAttr.Name}"), ${type}.class}); + public static final Property<$type> ${stringUtils.capitalizedAsConstant($idAttr.Name)}_PK_COLUMN = Property.create(ExpressionFactory.dbPathExp("${idAttr.Name}"), ${type}.class}); #else public static final String ${stringUtils.capitalizedAsConstant($idAttr.Name)}_PK_COLUMN = "${idAttr.Name}"; #end http://git-wip-us.apache.org/repos/asf/cayenne/blob/da720a59/cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm ---------------------------------------------------------------------- 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 6f8449d..e275c0f 100644 --- a/cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm +++ b/cayenne-cgen/src/main/resources/templates/v4_1/superclass.vm @@ -87,7 +87,7 @@ public abstract class ${superClassName} extends ${baseClassName} { #foreach( $idAttr in ${object.DbEntity.PrimaryKeys} ) #if( $createPKProperties && !${entityUtils.declaresDbAttribute($idAttr)}) #set ( $type = "$importUtils.dbAttributeToJavaType($idAttr)") - public static final Property<$type> ${stringUtils.capitalizedAsConstant($idAttr.Name)}_PK_PROPERTY = Property.create(ExpressionFactory.dbPathExp("db:${idAttr.Name}"), ${type}.class); + public static final Property<$type> ${stringUtils.capitalizedAsConstant($idAttr.Name)}_PK_PROPERTY = Property.create(ExpressionFactory.dbPathExp("${idAttr.Name}"), ${type}.class); #end public static final String ${stringUtils.capitalizedAsConstant($idAttr.Name)}_PK_COLUMN = "${idAttr.Name}"; #end