-
1. Re: MSSQL Server Auto Increment
viz Jul 22, 2003 9:57 AM (in response to digitalmonkey)Nop, but auto_increment with the latest version of mySQL and JBoss 3.2.1 work fine.
Let me know if you need help getting it to work.
Kind regards,
--
Marc -
2. Re: MSSQL Server Auto Increment
viz Jul 22, 2003 9:58 AM (in response to digitalmonkey)Sorry - misread - thought I saw mySQL not MS...
Kind regards,
--
Marc -
3. Re: MSSQL Server Auto Increment
artmotion Aug 5, 2003 1:38 PM (in response to digitalmonkey)Help me.
I'm using PostgreSQL with the cmp2 example for the AdminDocs 3.2.1 (nice book).
But when I insert into jbosscmp-jdbc.xml
java:/PostgreDS
<datasource-mapping>PostgreSQL 7.2</datasource-mapping>
<create-table>true</create-table>
<remove-table>false</remove-table>
<pk-constraint>true</pk-constraint>
<preferred-relation-mapping>foreign-key</preferred-relation-mapping>
I get the:
java.lang.IllegalStateException: auto-increment template not found
Error :(
Can PostgreSQL do auto_increment? Or how do I define to use JBoss to do auto_increment?
Could you tell me both ways? -
4. Re: MSSQL Server Auto Increment
bontempo Sep 23, 2003 6:25 PM (in response to digitalmonkey)I've got the same problem in Oracle !
<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 I really need the ID value !
THANKS