Author: dan.j.allen
Date: 2009-03-30 21:21:01 -0400 (Mon, 30 Mar 2009)
New Revision: 10242
Modified:
trunk/seam-gen/src/EntityHome.java.ftl
trunk/seam-gen/src/EntityList.java.ftl
Log:
JBSEAM-3278
Modified: trunk/seam-gen/src/EntityHome.java.ftl
===================================================================
--- trunk/seam-gen/src/EntityHome.java.ftl 2009-03-30 22:11:04 UTC (rev 10241)
+++ trunk/seam-gen/src/EntityHome.java.ftl 2009-03-31 01:21:01 UTC (rev 10242)
@@ -13,7 +13,7 @@
<#assign parentPojo =
c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentHomeName = parentPojo.shortName?uncap_first + "Home">
@${pojo.importType("org.jboss.seam.annotations.In")}(create=true)
- ${parentPojo.shortName}Home ${parentHomeName};
+ <#if
parentPojo.packageName!="">${pojo.importType("${parentPojo.packageName}.${parentPojo.shortName}")}<#else>${parentPojo.shortName}</#if>Home
${parentHomeName};
</#if>
</#foreach>
@@ -113,7 +113,7 @@
<#assign getter = pojo.getGetterSignature(property)>
<#if c2h.isOneToManyCollection(property)>
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
- public ${pojo.importType("java.util.List")}<${childPojo.shortName}>
${getter}() {
+ public ${pojo.importType("java.util.List")}<<#if
childPojo.packageName!="">${pojo.importType("${childPojo.packageName}.${childPojo.shortName}")}<#else>${childPojo.shortName}</#if>>
${getter}() {
return getInstance() == null ?
null : new
${pojo.importType("java.util.ArrayList")}<${childPojo.shortName}>(
getInstance().${getter}() );
}
@@ -124,7 +124,7 @@
</#assign>
<#if pojo.packageName != "">
-import ${pojo.packageName}.*;
+import ${pojo.packageName}.*;<#-- This import is necessary because we're using a
different package than Hibernate Tools expects -->
</#if>
${pojo.generateImports()}
${classbody}
Modified: trunk/seam-gen/src/EntityList.java.ftl
===================================================================
--- trunk/seam-gen/src/EntityList.java.ftl 2009-03-30 22:11:04 UTC (rev 10241)
+++ trunk/seam-gen/src/EntityList.java.ftl 2009-03-31 01:21:01 UTC (rev 10242)
@@ -5,7 +5,7 @@
package ${actionPackage};
<#if pojo.packageName != "">
-import ${pojo.packageName}.*;
+import ${pojo.packageName}.*;<#-- This import is necessary because we're using a
different package than Hibernate Tools expects -->
</#if>
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;