[seam-commits] Seam SVN: r8080 - trunk/seam-gen/src and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Apr 30 11:12:50 EDT 2008
Author: pete.muir at jboss.org
Date: 2008-04-30 11:12:49 -0400 (Wed, 30 Apr 2008)
New Revision: 8080
Modified:
branches/Seam_2_0/seam-gen/src/EntityHome.java.ftl
trunk/seam-gen/src/EntityHome.java.ftl
Log:
JBSEAM-2836
Modified: branches/Seam_2_0/seam-gen/src/EntityHome.java.ftl
===================================================================
--- branches/Seam_2_0/seam-gen/src/EntityHome.java.ftl 2008-04-30 13:10:25 UTC (rev 8079)
+++ branches/Seam_2_0/seam-gen/src/EntityHome.java.ftl 2008-04-30 15:12:49 UTC (rev 8080)
@@ -43,7 +43,7 @@
{
<#foreach property in pojo.identifierProperty.value.propertyIterator>
<#assign getter = pojo.getGetterSignature(property)>
-<#if property.value.typeName == "string">
+<#if property.value.typeName == "string" || property.value.typeName == "java.lang.String" >
if ( get${idName}().${getter}()==null || "".equals( get${idName}().${getter}() ) ) return false;
<#elseif !c2j.isPrimitive( pojo.getJavaTypeName(property, true) )>
if ( get${idName}().${getter}()==null ) return false;
@@ -51,6 +51,7 @@
if ( get${idName}().${getter}()==0 ) return false;
</#if>
</#foreach>
+
return true;
}
@@ -67,7 +68,6 @@
public void wire()
{
- getInstance();
<#foreach property in pojo.allPropertiesIterator>
<#if c2h.isManyToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
Modified: trunk/seam-gen/src/EntityHome.java.ftl
===================================================================
--- trunk/seam-gen/src/EntityHome.java.ftl 2008-04-30 13:10:25 UTC (rev 8079)
+++ trunk/seam-gen/src/EntityHome.java.ftl 2008-04-30 15:12:49 UTC (rev 8080)
@@ -43,7 +43,7 @@
{
<#foreach property in pojo.identifierProperty.value.propertyIterator>
<#assign getter = pojo.getGetterSignature(property)>
-<#if property.value.typeName == "string">
+<#if property.value.typeName == "string" || property.value.typeName == "java.lang.String" >
if ( get${idName}().${getter}()==null || "".equals( get${idName}().${getter}() ) ) return false;
<#elseif !c2j.isPrimitive( pojo.getJavaTypeName(property, true) )>
if ( get${idName}().${getter}()==null ) return false;
More information about the seam-commits
mailing list