Well, I added the table, but I still get the exception :(

org.apache.torque.TorqueException: IdGenerator for table 'customers' is null
       at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:708)
       at tutim.db.DBCustomersPeer.doInsert(DBCustomersPeer.java:258)
       at tutim.db.DBCustomersPeer.doInsert(DBCustomersPeer.java:636)
       at tutim.db.DBCustomers.save(DBCustomers.java:993)
...


[EMAIL PROTECTED] wrote:

Hi Ron,

I had the same problem with an oracle database. My solution was to add the table ID_TABLE:

create table ID_TABLE (ID_TABLE_ID NUMBER(20) NOT NULL, TABLE_NAME VARCHAR2(50) NOT NULL,
NEXT_ID NUMBER(20) NOT NULL,
QUANTITY NUMBER(20) NOT NULL)


In my case the table is empty, because I'm using oracle sequence numbers.

Hope that helps,
Arndt





ron piterman <[EMAIL PROTECTED]>
13.07.2004 11:07
Please respond to "Apache Torque Users List"


To: Apache Torque Users List <[EMAIL PROTECTED]>
cc: Subject: Re: IdGenerator is null



I don't know if it mutters, but I also habe: torque.idbroker.cleverquantity=true


Andras Balogh wrote:



Hello,

How is your torque.properties file look like?
Do you have a line like:
torque.database.<yourdb_name>.adapter=mysql
?

Best regards,
Andras.

ron piterman wrote:



Hi,
I am using torque with mysql, generating the schema vie the ant jdbc task, and then the obejct model with the om task.
When calling save(connection) on a new object (thus inserting), I get an exception: IdGenerator is null.
in my Map classes, the generator method is set to NATIVE.
What did I forget?
Cheers,
Ron



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



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





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





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





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



Reply via email to