Darren Hartford
2003-12-08 18:13:03 UTC
Hey all,
Been testing Middlegen on and off, and now have a project that is perfect for MiddleGen where I have an existing database that will be used to setup EJB's. Unfortunately, for the life of me I can not get MiddleGen to generate Entity Bean classes (EJB2/CMP2) based on tables with 1:N relations that will deploy correctly on JBoss.
"Both roles of a relation-table mapped relationship must have key fields"
This is a consistent error with JBoss 3.2.2, 3.2.3, 4.0DR2 on MiddleGen-2.0-b1. I did try to run MiddleGen CVS/2.0-b2 but the CMP20 plugin is broken as far as I could tell.
I have tested with FKCMP equals true and equals false (although my preference is to 'true' since that is how the existing table is layed out).
CMP section of the ant/maven task:
<cmp20
destination="${basedir}/generated/middlegen"
package="${pom.package}.domain.ejb"
interfacepackage="${pom.package}.domain.interfaces"
readonly="false"
fkcmp="true"
<jboss/>
</cmp20>
The database is MS SQL Server (not my choice) and using M$ JDBC drivers with great success (better results than jTDS).
Any help please? Saying this is urgent is pointless, I know, but was hoping MiddleGen could sweep in for the win!
-D
Been testing Middlegen on and off, and now have a project that is perfect for MiddleGen where I have an existing database that will be used to setup EJB's. Unfortunately, for the life of me I can not get MiddleGen to generate Entity Bean classes (EJB2/CMP2) based on tables with 1:N relations that will deploy correctly on JBoss.
"Both roles of a relation-table mapped relationship must have key fields"
This is a consistent error with JBoss 3.2.2, 3.2.3, 4.0DR2 on MiddleGen-2.0-b1. I did try to run MiddleGen CVS/2.0-b2 but the CMP20 plugin is broken as far as I could tell.
I have tested with FKCMP equals true and equals false (although my preference is to 'true' since that is how the existing table is layed out).
CMP section of the ant/maven task:
<cmp20
destination="${basedir}/generated/middlegen"
package="${pom.package}.domain.ejb"
interfacepackage="${pom.package}.domain.interfaces"
readonly="false"
fkcmp="true"
<jboss/>
</cmp20>
The database is MS SQL Server (not my choice) and using M$ JDBC drivers with great success (better results than jTDS).
Any help please? Saying this is urgent is pointless, I know, but was hoping MiddleGen could sweep in for the win!
-D