I two CMP beans which use database generated primary keys. (MySQL auto_increment) Tables A and B, with a one-to-many from A to B, cascade delete.
The problem is that when I delete a record from A I get an error from MySQL which is of the form "Unknown column 'a' in 'where' clause". It seems the generated SQL is using the column name 'a' for the foreign key rather than 'aId' which it is. But then I can't use a <key-field> element in the jbosscmp-jdbc.xml to map to a column name because I need a field name. Generated keys don't get field names. Exposing the foreign key as a persistance field also doesnot seem to work. Does anyone have and example of how to do this. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908788#3908788 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908788 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
