db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf Jentsch <RJent...@electronicpartner.de>
Subject Re: problem with Postgresql and sequences for autoincrement
Date Thu, 17 Apr 2003 12:30:46 GMT

I think you are trying to create the same sequence twice. For the primary key 
you force the creation of a squence "telsupport_telsupport_id_seq". This same 
sequence is automatically created by postgresql for the serial datatype.

So you can either remove the autoincrement="true" for your primary key, or you 
can set idMethod="none" for this table. In both cases you get in the database 
an integer column with a defaultvalue provided by a sequence.

The second approach may cause some problems with the generated java-code, so 
you probably should use the first one.

I hope this solves your problem.

Am Donnerstag, 17. April 2003 12:55 schrieb Tak Fujimoto:
> This is the part of project-schema.xml which describes the table I am
> having a trouble with.
> ***************************************************************************
>************** <table name="TELSUPPORT" idMethod="native">
>   <column name="TELSUPPORT_ID"      type="INTEGER"  required="true" 
> autoIncrement="true" primaryKey="true" />
> <id-method-parameter value="telsupport_telsupport_id_seq"/>
> Tak Fujimoto
> Being Co, Ltd.
> [ALLESNET]  Network Division
> web   : http://www.alles.or.jp/
> email : fujimoto@alles.ad.jp
> tel : 03-3226-8421
> fax : 03-3226-8425

Rolf Jentsch
Produktentwicklung EDV-Anwendungen für Mitglieder
ElectronicPartner GmbH & Co. KG

View raw message