I'm using JBoss 3.2.1 & Oracle 9i + DataDirect JDBC 3.3 and i'm getting an error when deploying a bean wiith the <auto-increment/> option.
<ejb-name>SiteImages</ejb-name>
<table-name>SITEIMAGES</table-name>
<entity-command name="get-generated-keys" class="org.jboss.ejb.plugins.cmp.jdbc.jdbc3.JDBCGetGeneratedKeysCreateCommand" />
<cmp-field>
<field-name>id</field-name>
<column-name>ID</column-name>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
<auto-increment/>
</cmp-field>
<cmp-field>
<field-name>idSite</field-name>
<column-name>ID_SITE</column-name>
</cmp-field>
I get :
java.lang.IllegalStateException: auto-increment template not found
Does anyone know how to solve this ?
If I remove the <auto-increment/> Jboss gets the ROWID as the generated key, but what I really need is ID column value !
THANKS
Just to tell that the ID column primary key is generated using a trigger in the database.
The database has a constraint telling that the field is a PK and an index is also associated with it (if this does matter ;) )
THANKS