M-Leander Reimer
2002-07-01 12:22:28 UTC
Hi,
I came across a problem with Middlegen samples + JBoss 3.0.0 + mySQL and
I could need some advice.
Basically, it is not allowed in JBoss to declare a CMR field also as a
CMP field. The Hypersonic DB in JBoss doens't complain, but mySQL does.
What happens is that the generated create table statement has a
duplicate column name for all foreign key fields. The solution to it is
(from JBoss forum) not to declare the foreign key fields as CMP.
The question is: How do I change Middlegen appropriately? I changed the
Velocity template not to include the setter/getter methods (and the
ejb:persistent tag) for all foreign key columns. Is this OK that way??
Is it still possible to have a compound primary key (like it is in the
Reservation table) without declaring the CMP fields for the foreign
keys?
Thanks for your help!
Leander
I came across a problem with Middlegen samples + JBoss 3.0.0 + mySQL and
I could need some advice.
Basically, it is not allowed in JBoss to declare a CMR field also as a
CMP field. The Hypersonic DB in JBoss doens't complain, but mySQL does.
What happens is that the generated create table statement has a
duplicate column name for all foreign key fields. The solution to it is
(from JBoss forum) not to declare the foreign key fields as CMP.
The question is: How do I change Middlegen appropriately? I changed the
Velocity template not to include the setter/getter methods (and the
ejb:persistent tag) for all foreign key columns. Is this OK that way??
Is it still possible to have a compound primary key (like it is in the
Reservation table) without declaring the CMP fields for the foreign
keys?
Thanks for your help!
Leander