I can't really decide if I have a problem here, or not. appfuse:gen won't
automatically build my subclasses, but I can't tell whether it's just that
tool or whether there's something inherently wrong with my table structure.
I have a number of joined tables, defined like:
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public class Class1 extends BaseObject {
private Long id;
@Id @GeneratedValue(strategy = GenerationType.AUTO)
public Long getId(){
return id;
}
...
}
@Entity
public class Class2 extends Class1{...}
hbm2ddl creates tables nicely in MySQL and "mvn appfuse:gen -Dentity=Class1"
works (though appfuse:gen doesn't appear to be able to deal with classes
with the same name as a class in org.appfuse, eg "Address"), but "mvn
appfuse:gen -Dentity=Class2" tells me:
[cocoa] ERROR [main] runtime.error(96) |
Expression idFieldName is undefined on line 39, column 57 in
appfuse/web/struts/form-view.ftl.
The problematic instruction:
----------
==> ${idFieldName} [on line 39, column 55 in
appfuse/web/struts/form-view.ftl]
This appears to be because there is not actually an @Id annotation for the
subclass (and can't be, afaict). There's
no -validation.xml, -struts.xml, -ApplicationResources.properties,
-web-tests.xml
or anything under src/main/webapp, except the *List.jsp, for Class2 or any
of _its_ subclasses (which all show the same error as appfuse:gen does for
Class2).
--
derek
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]