db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Broadhead <robbroadh...@mindspring.com>
Subject Postgres sequences in version 3.0.2
Date Mon, 09 Feb 2004 20:27:18 GMT
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


Mime
View raw message