[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-user
Subject: [JBoss-user] [Persistence & CMP/JBoss] - Re: auto-increment filed Postgresql and jbosscmp-jdbc.xml
From: vmukkamala <nukes () jboss ! org>
Date: 2004-03-31 16:02:28
Message-ID: 12416776.1080748948242.JavaMail.root () nukes ! jboss ! org
[Download RAW message or body]
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
View the original post : \
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3828393#3828393
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3828393
-------------------------------------------------------
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
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic