same exception under mysql and db2!
i reported this error some days ago, but no reaction from
developer
AY> Hello all,
AY> I am using torque b4, with Mssql and struts. I successfully generated om
AY> objects, using the defaultIdMethod="none" and everything was fine. The
AY> problem I ran into was that when I inserted a record into a table called
AY> approgram, which has a primary key called ndx (autoincrement). The save was
AY> successful, but when I try to retrieve the ndx right after calling the save,
AY> I get a null pointer exception.
AY> approgram.setUserndx("1");
AY> approgram.save();
AY> System.out.println(approgram.getNdx().toString()); <-- Null pointer
AY> exception right here.
AY> Then I changed the defaultIdMethod="native" to see, if that will solve my
AY> problem and I am getting the following error:
AY> org.apache.torque.TorqueException: IdGenerator for table 'apProgram' is null
AY> at com.adphobia.om.BaseApprogram.save(BaseApprogram.java:1405)
AY> at com.adphobia.om.BaseApprogram.save(BaseApprogram.java:1382)
AY> at com.adphobia.test.TestTorque.addProgram(TestTorque.java:46)
AY> at com.adphobia.test.TestTorque.main(TestTorque.java:61)
AY> Has anyone seen this. Is it possible to retreive the ndx, right after saving
AY> it, without having to do another lookup. Any help is greatly appreciated.
AY> Thanks,
AY> Abbas.
AY> --
AY> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
AY> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
Best regards
homburg Softwaretechnik
Sven Homburg
D-21220 Seevetal
http://www.hsofttec.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>