-
1. Re: jbosscmp-jdbc.xml relationship mapping dbindex problems
triathlon98 Jul 9, 2004 3:28 PM (in response to garek)How is your table created?
Would it be possible to try to enable alter-table? This would update your DB structure (careful, it can also remove fields).
If JBoss actually assumes the field to exist, then it would be created.
If you try to access the bean, does that work? Does it also generate SQL code which reads the non-existent field?
Joachim -
2. Re: jbosscmp-jdbc.xml relationship mapping dbindex problems
garek Jul 9, 2004 4:01 PM (in response to garek)The tables are created by Jboss.
I thought about using the alter-table command, but I wanted to try to use the command so that I wouldn't have to write and maintain the sql statements to create the indexes (there are a lot of EJBs and relationships in this application).
I didn't try to access the bean after the sql exception, I think the deployment was halted after that.
Thanks for the input,
Brian -
3. Re: jbosscmp-jdbc.xml relationship mapping dbindex problems
triathlon98 Jul 13, 2004 6:05 PM (in response to garek)I think there was a fix regarding fk-constraint mapping in MySQL a few days ago. Please try again using the latest version from CVS.
Joachim -
4. Re: jbosscmp-jdbc.xml relationship mapping dbindex problems
aloubyansky Jul 14, 2004 6:01 AM (in response to garek)Just the index name was removed.
<fk-constraint-template>ALTER TABLE ?1 ADD INDEX (?3), ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>