RE: newbie question about postgres: nextval

Thomas Fischer <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <OF701730A7.8A020BBE-ONC125754A.00498F45-C125754A.0049F24B@seitenbau.net>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.