You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Rob Broadhead <ro...@mindspring.com> on 2004/02/09 21:27:18 UTC

Postgres sequences in version 3.0.2

I have seen several posts about problems with Postgres sequences returning 
this kind of error:



org.apache.torque.TorqueException: IdGenerator for table 'Clients' is null
         at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:690)
         at 
com.athlon.managers.BaseClientsPeer.doInsert(BaseClientsPeer.java:236)
         at 
com.athlon.managers.BaseClientsPeer.doInsert(BaseClientsPeer.java:602)
         at com.athlon.managers.BaseClients.save(BaseClients.java:1825)
         at com.athlon.action.ClientAction.execute(ClientAction.java:77)
         at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)



I have sequences setup and have even tried to force adding an idgenerator 
via this code:

dbMap.addIdGenerator("myDB",new SequenceIdGenerator(Torque.getDB("myDB")));

(BTW what is the string parameter supposed to be for this method? I'm not 
sure I have that parm correct)

all to no avail. I assume someone is using Postgres with torque so do I 
need to simply convert to the id broker or is there a way to get the 
sequences to work. Any help or places to look or an example of adding an 
IDGenerator would be appreciated.

Thanks,
Rob


//--------------------------------------------------------------------
Rob Broadhead - Consultant
RB Consulting Inc.
Rob@RB-SNS.com
//--------------------------------------------------------------------  


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org