db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivano Luberti <lube...@archicoop.it>
Subject Re: newbie question about postgres: nextval
Date Mon, 26 Jan 2009 15:15:04 GMT
Here it is .
In my prev message I didn't said that , I have defined the db using the
server , then I have generated the schema using the jdbc ant task and
the classes using the om ant task.
I don't want to define myself the shema file because I'm more famliar
with SQL and then I don't want to make Torque create or modify my DDL.
Finally I use Torque 3.3 version and the generator directly without
using Maven.



Thomas Fischer ha scritto:
>> I'm using postgres to generate torque classes but the automatic
>> generation seems to make a few mistakes.
>> In the base class I found this java statement
>>
>> private int pkAnagrafica =
>> nextval('anagrafica_pk_anagrafica_seq'::regclass);
>>
>> which is marked as wrong by the compiler.
>>
>> The same happens in the copyobject method of the same class:
>>
>> copyObj.setPkAnagrafica( 
>>     
> nextval('anagrafica_pk_anagrafica_seq'::regclass));
>   
>> Is there a way to stop Torque generating these bad statements ?
>>     
>
> Can you send the schema definition which you use for the table in question 
> ? This would ease diagnostics. I suspect that you use a default value for 
> the id; this is not necessary.
>
>    Thomas
>   

-- 
==================================================
Archimede Informatica NEWS!
==================================================

Realizzato il Sistema Integrato per la biglietteria della Torre di Pisa:
prenotazione, vendita, pre-vendita ed emissione dei biglietti di ingresso
alla Torre sia online che presso le biglietterie dislocate sulla piazza:

_http://www.opapisa.it/boxoffice

_Partner del Progetto Ci-Tel "Front office Telematico per il cittadino"
Ente Coordinatore Comune di Pisa

_http://www.comune.pisa.it/doc/e-government.htm


_==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
e-mail: archimede@archicoop.it
web: _http://www.archicoop.it


_ <http://www.archicoop.it/>__ <http://www.archicoop.it/>

Mime
View raw message