LS,

I have created a simple 3 way join table, joining a user to a company and to
a role. The tables are innoDB and the FK's are in place. When trying to
generate code, an exception is thrown.

Part of the trace:

19:28:22,996  WARN org.hibernate.cfg.reveng.JDBCReader - The JDBC driver
didn't report any primary key columns in user_company_role. Asking rev.eng.
strategy
19:28:22,996  WARN org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy
did not report any primary key columns for user_company_role
19:28:23,359 ERROR freemarker.runtime - 
Method public java.lang.String
org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateJoinColumnsAnnotation(org.hibernate.mapping.Property,org.hibernate.cfg.Configuration)
threw an exception when invoked on
org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(com.hw.app.model.UserCompanyRole)
The problematic instruction:
----------
==> ${pojo.generateJoinColumnsAnnotation(property)} [on line 11, column 15
in appfuse/model/Ejb3PropertyGetAnnotation.ftl]
 in include "Ejb3PropertyGetAnnotation.ftl" [on line 1, column 1 in
appfuse/model/GetPropertyAnnotation.ftl]
 in include "GetPropertyAnnotation.ftl" [on line 9, column 5 in
appfuse/model/PojoPropertyAccessors.ftl]
 in include "PojoPropertyAccessors.ftl" [on line 9, column 1 in
appfuse/model/Pojo.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public java.lang.String
org.hibernate.tool.hbm2x.pojo.EntityPOJOClass.generateJoinColumnsAnnotation(org.hibernate.mapping.Property,org.hibernate.cfg.Configuration)
threw an exception when invoked on
org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(com.hw.app.model.UserCompanyRole)

Does a join table have to have its own pk in order for code generation to
work?
-- 
View this message in context: 
http://www.nabble.com/code-generation-fails-on-a-join-table-tp25416651s2369p25416651.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to