I believe to remember that there was an discussion about that issue on the
list some
time ago. As far as i remember it is an issue with the templates for mysql
and
it should work if you set idMethod="native" on database level too...

without any warranty,
Michael


> -----Original Message-----
> From: Mansour Raad [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2003 2:07 AM
> To: [EMAIL PROTECTED]
> Subject: newbie question
> 
> 
> Hi,
> 
> If I define the idMethod as 'idbroker' in the table tag in 
> the schema.xml
> file, my test program works fine. However, when I switch it 
> to 'native' (as
> my db is mysql) my test program
> 
> produces:
> 
> org.apache.torque.TorqueException: IdGenerator for table 
> 'snapshot_head' is
> null at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:690) at
> 
> com.npd.torque.BaseSnapshotHeadPeer.doInsert(BaseSnapshotHeadP
> eer.java:219)
> at
> 
> com.npd.torque.BaseSnapshotHeadPeer.doInsert(BaseSnapshotHeadP
> eer.java:569)
> at com.npd.torque.BaseSnapshotHead.save(BaseSnapshotHead.java:592)
> 
> at com.npd.torque.BaseSnapshotHead.save(BaseSnapshotHead.java:554)
> 
> at com.npd.torque.BaseSnapshotHead.save(BaseSnapshotHead.java:534)
> 
> at com.npd.torque.SnapshotHeadTest.main(SnapshotHeadTest.java:15)
> 
> Exception in thread "main" Process terminated with exit code 1
> 
> My question, is why is it still using the idGenerator, as MySQL has an
> autogeneration method !!! I'm missing something somewhere, 
> and have been
> staring at this for a while, any help will be appreciated !
> 
> Regards,
> 
> Mansour
> 
> ;-)
> 
> 

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

Reply via email to