You must use the unknow-pk feature to handle auto generated keys In ejb-jar.xml: 1) declare the primary key class of type java.lang.Object 2 ) declare the return type of ejbCreate of java.lang.Object
in jbosscmp-jdbc.xml : 3 ) declare the unknow-pk and add an entity command as follows in : | <unknown-pk> | <unknown-pk-class>java.lang.Integer</unknown-pk-class> | <field-name>id</field-name> | <column-name>emp_id</column-name> | <jdbc-type>INTEGER</jdbc-type> | <sql-type>INTEGER</sql-type> | <auto-increment/> | </unknown-pk> | <entity-command name="mysql-get-generated-keys"> | I hope this helps you View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3831864#3831864 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3831864 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
