db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Burghardt <carsten.burgha...@login-solutions.de>
Subject sequence problem with postgres
Date Mon, 27 Jan 2003 15:50:02 GMT

I read about some problems with the generation of the correct sequence-name 
for postgres but this seems to be fixed. However there are some other 
problems and I simply don't get it going.
I have some postgres-tables with "id"-fields that are serials.
When torque (3.0) generates the schema from that (option jdbc) I get:
    <table name="myuser">
            name="id" primaryKey="true" required="true" type="INTEGER"/>
        <column name="username" required="true" size="100" type="VARCHAR"/>
        <column name="password" required="true" size="30" type="VARCHAR"/>
        <column name="fullname" size="100" type="VARCHAR"/>

This results in a Java-definition like this:

int id = "'myuser_id_seq'::text"

This doesn't even compile.
So I tried the idbroker. When I create a new User-object and call save() I 

DEBUG oid.IDBroker  - updateQuantity: UPDATE ID_TABLE SET QUANTITY = 10 WHERE 
TABLE_NAME = 'myuser'
java.sql.SQLException: ERROR:  Relation 'id_table' does not exist

Any hints what to do?


Dipl. Inf. Carsten Burghardt
Login & Solutions AG
email: carsten.burghardt@login-solutions.de
Tel: 0821/2488-311     Fax: 0821/2488-180

View raw message