You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2013/05/26 22:33:22 UTC
svn commit: r1486472 -
/cayenne/main/trunk/framework/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm
Author: aadamchik
Date: Sun May 26 20:33:21 2013
New Revision: 1486472
URL: http://svn.apache.org/r1486472
Log:
CAY-1724 Add 'Property' class for easier and better Expression creation
must use client class name for the rel target
Modified:
cayenne/main/trunk/framework/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm
Modified: cayenne/main/trunk/framework/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm?rev=1486472&r1=1486471&r2=1486472&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm (original)
+++ cayenne/main/trunk/framework/cayenne-tools/src/main/resources/templates/v1_2/client-superclass.vm Sun May 26 20:33:21 2013
@@ -79,14 +79,14 @@ public abstract class ${superClassName}
#foreach( $rel in ${object.DeclaredRelationships} )
#if( $rel.ToMany )
#if ( ${rel.CollectionType} == "java.util.Map")
- #set( $type = "$importUtils.formatJavaType($rel.CollectionType)<$importUtils.formatJavaType($entityUtils.getMapKeyType($rel)), $importUtils.formatJavaType($rel.TargetEntity.ClassName)>" )
+ #set( $type = "$importUtils.formatJavaType($rel.CollectionType)<$importUtils.formatJavaType($entityUtils.getMapKeyType($rel)), $importUtils.formatJavaType($rel.TargetEntity.ClientClassName)>" )
public static final Property<$type> ${stringUtils.capitalizedAsConstant($rel.Name)} = new Property<$type>("${rel.Name}");
#else
- #set( $type = "$importUtils.formatJavaType($rel.CollectionType)<$importUtils.formatJavaType($rel.TargetEntity.ClassName)>" )
+ #set( $type = "$importUtils.formatJavaType($rel.CollectionType)<$importUtils.formatJavaType($rel.TargetEntity.ClientClassName)>" )
public static final Property<$type> ${stringUtils.capitalizedAsConstant($rel.Name)} = new Property<$type>("${rel.Name}");
#end
#else
- public static final Property<$importUtils.formatJavaType(${rel.TargetEntity.ClassName})> ${stringUtils.capitalizedAsConstant($rel.Name)} = new Property<$importUtils.formatJavaType(${rel.TargetEntity.ClassName})>("${rel.Name}");
+ public static final Property<$importUtils.formatJavaType(${rel.TargetEntity.ClientClassName})> ${stringUtils.capitalizedAsConstant($rel.Name)} = new Property<$importUtils.formatJavaType(${rel.TargetEntity.ClientClassName})>("${rel.Name}");
#end
#end