]
Dr. Richard Li commented on JBAS-2011:
--------------------------------------
No need to do a patch, you can create the serial field using jbosscmp-jdbc.xml:
{code:xml}
<entity>
<ejb-name>TestObject</ejb-name>
<cmp-field>
<field-name>pk</field-name>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>bigserial</sql-type>
<auto-increment/>
</cmp-field>
<entity-command name="postgresql-fetch-seq"/>
</entity>
{code}
Make table auto-creation create SERIAL columns with Postgresql when
using auto-increment feature
------------------------------------------------------------------------------------------------
Key: JBAS-2011
URL:
http://jira.jboss.com/jira/browse/JBAS-2011
Project: JBoss Application Server
Issue Type: Patch
Security Level: Public(Everyone can see)
Components: CMP service
Affects Versions: JBossAS-4.0.2 Final, JBossAS-4.0.3 Final
Environment: FreeBSD, JBoss 4.0.2, Postgresql
Reporter: Jonathan Chen
Priority: Optional
Attachments: patch-serial-autoinc
Original Estimate: 30 minutes
Remaining Estimate: 30 minutes
If the auto-increment feature is enabled for Postgresql tables, the tables will not be
created with the SERIAL attribute.
A patch to fix this (against 4.0.2, 4.0.3) without invoking post-creation commands is
available at:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/java/jboss4/files/...
Basically, the patch breaks down the <auto-increment-template> from 1 substitution
to 3 substitutions. This allows the field creation for serial fields in Postgresql (and
Informix) to be specified in detail. The patch includes corrections for databases to use
the extended format.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: