The ID_TABLE is a table maintained by Torque to generate and manage
unique record IDs for each table.  When you use Torque to generate the
database it populates this table with one record for each table that
uses Torque to generate primary key IDs.  If you add a new table to the
schema and set the idMethod attribute to "idbroker" it will use Torque
to generate IDs and you need to manually add a record to the ID_TABLE
table or run the generated SQL script to populate this table.

-----Original Message-----
From: Nuno Miguel Rodrigues [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 16, 2005 1:27 AM
To: Apache Torque Users List
Cc: Jeff Fowler (Chi-square); Jon Fleming (Chi-square)
Subject: Re: Does anyone know why I get the following error? What's the
ID_TABLE?

On Tue, 15 Feb 2005 19:58:19 -0800, Joseph Yuen <[EMAIL PROTECTED]>
wrote:
> *** Exception saving record
> org.apache.torque.TorqueException: The table encounter does not have a
> proper entry in the ID_TABLE
>         at org.apache.torque.oid.IDBroker.selectRow(IDBroker.java:825)

    [...]

> I get this error doing:
> 
>                 Encounter encounter = new Encounter();
>                 encounter.setEncounterdate(StringToDate(f.getDate()));
>                 encounter.setPersonid(personid);
>                 encounter.save();

    [...]

    See http://db.apache.org/torque-32/user-guide.html.


-- 
Nuno Miguel Rodrigues <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to