I made the changes you specified below to the mapping file and the equivalent objects now accept integers. But the same error is still occuring! Do you think it could be an error with the database or mapping file or my java code?
I'm not sure what's wrong...do you have the getter/setter-methods with correct case?
I believe it should be getId() and setId(int id)...
To rule out it's a database setup-mistake try a simple "insert into..." statement and omit the id-field. If the id-field increments correctly we know *not* what to look for...
Stein
----- Original Message ----- From: "Stein M. Eliassen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 26, 2003 12:25 PM Subject: Re: [castor-dev] SQLException caused by key-generator in mapping file
alex.smith31 wrote:
<field name="id" type="string"> <sql name="id" type="integer"/> </field>
Change to: <field name="id" type="integer"> <sql name="id"/> </field>
Also change your type to accept integers as id.
Stein
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
