This content has been marked as final.
Show 1 reply
-
1. Re: auto-increment filed Postgresql and jbosscmp-jdbc.xml
sysuser1 Mar 31, 2004 11:02 AM (in response to vitimreka)You need to use "entity-command" to get the auto-increment value after insert
Your jbosscmp-jdbc.xml will look something like this<entity> : <cmp-field> <field-name>Some_Auto_Incrementing_Field</field-name> <column-name>Some_Auto_Incrementing_Column</column-name> <!-- Added for auto-incrementing columns --> <auto-increment /> </cmp-field> <cmp-field> : </cmp-field> <!-- the last cmp field --> <!-- Added for auto-incrementing columns --> <entity-command name="postgresql-fetch-seq" /> <query> <!-- the first query --> : </query> </entity>
You can refers to JBoss Docs for more information. "standardjbosscmp-jdbc.xml" in the JBOSS_HOME/server/default/conf is a good place to start.
Hope this helps
VM