[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2007) new-entity and generate-entities don't use same package name
Dan Allen (JIRA)
jira-events at lists.jboss.org
Sun Sep 30 00:00:41 EDT 2007
new-entity and generate-entities don't use same package name
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.CR1
Reporter: Dan Allen
Fix For: 2.0.0.GA
The *Home.java and *List.java classes that are produced by new-entity do not use the same package as the same classes produced by generate-entities.
Assuming the entity name is MyEntity, here is how the two actions play out.
Notice that generate-entities uses "model" while the new-entity uses "action".
This behavior is due to a limitation in the hbmtemplate task which assumes that the Java files created will be in the same package as the model. However, it is possible to work around this problem. I have created such a patch. I believe that new-entity exhibits the correct behavior and puts the classes in the expected location.
The only limitation of doing this patch is that it is necessary to use a star import for the model classes since the hbmtemplate task assumes the current package is the package of the entity (hence even pojo.importType() wouldn't work). However, this shouldn't really be an issue since the IDE can cleanup the star imports. I would much rather have the consistency of the same package. Besides, *List.java and *Home.java are action components, not models.
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues