> > Hi Quinton,
> > it's good to understand finally that the Turbine* om-classes
> > are not needed at all. They don't need to be generated, as
> > Turbine uses the classes that come along with the
> > org.apache.turbine package. It's a miracle to me why the
> > turbine-schema.xml file has not been removed in the latest
> > Turbine-release, or at least put into a separate dir to make
> > clear it is not needed (or rather must not) to be generated
> > for a project.
>
> The turbine-schema.xml file, I think, is still used for the ant task to
> create you database for you. I probably need to figure out how to keep
Yeah, you are right. I forgot about that.
> Torque from generating objects from it but still allow it to be used to
> generate database schemas. I am assuming that you manually added the
> column to TURBINE_USER in the database as I did.
For now I didn't add any field to turbine_user. I need only the foreign key.
Rather maybe I will try later to delete some of the fields of turbine_user.
Btw, my table kunde is an extension of the user, and therefore has kunde_id
both as the foreign key to turbine_user and primary key.
> > Anyway, in order for the om-classes to compile I needed to
> > add the following changes to your patch:
> >
> > 1) TurbineUserAdapter.getUserId() must return int (not Integer)
> >
> > public int getUserId()
> > {
> > return ((NumberKey)getPrimaryKey()).intValue();
> > //NOT: return new
> > Integer(((NumberKey)getPrimaryKey()).intValue());
> > }
> >
> > since the Base* classes expect int values, not Integer.
>
> This is caused by the javaType of you extended user table definition. I
> set the defaultJavaType in my database tag to "object". I think you are
> using "primitive" which is the default. I use the other setting simply
> because it is impossible to have a field defined as an int with a null
> value. The same is true for other data types as well.
That's interesting to know. What is the exact xml-syntax?
Is it specified in the database-element like this?
<database defaultJavaType="object">
Is it possible to specifiy this for each table individually? Probably this
would cause trouble with TurbineUserAdapter.
Maybe I will try to change this in my project and get back to Integer.
Marc
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>