This content has been marked as final.
Show 1 reply
-
1. Re: help me! Jboss doesn't create PK JAVA file for primary k
harshi2003 Sep 1, 2004 5:17 AM (in response to kuhan77)i am using jboss-3.2.3 with my eclipse ide.
you have to use Integer as the primart key type and also include following for auto increament field
* @ejb.pk class = "java.lang.Integer"
@jboss.unknown-pk class = "java.lang.Integer" column-name = "sid" auto-increment = "true" sql-type = "INT(11)" jdbc-type = "INTEGER"
* @jboss.entity-command name="mysql-get-generated-keys" class = "org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand"
then before u delcare getter and setter methods include following code for auto increament
@jboss.persistence auto-increment = "true"
hope this is help ful to you