ALTER TABLE ?1 ADD INDEX ind_?3 (?3), ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)
as row-locking-template works fine if the key contains only one field. The problem is that if you have more than one field in the foreign key, ?3 is replaced as field1, field2, ... I modified it to ALTER TABLE ?1 ADD INDEX ?2_idx (?3), ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5) that works with JBoss 3.2.3 and MySQL 4.1. chris View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835890#3835890 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835890 ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user