The getter/setter methods are all correct.
Is it possible to get the system to print out the SQL that is being executed
when I call the db.create(Object) method? This should shed some light on the
problem. I think I will then have to start debugging to see at what point
the 'user_profile_id' becomes null.
I imagine what I am trying to do is quite common, so I am surprised at this
strange error. Thanks again for your comments.
Alex
----- Original Message -----
From: "Stein M. Eliassen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 26, 2003 1:15 PM
Subject: Re: [castor-dev] SQLException caused by key-generator in mapping
file
> alex.smith31 wrote:
> > 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