db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Shea <s...@gtsdesign.com>
Subject Re: om classes with compile errors
Date Wed, 17 Sep 2003 15:25:54 GMT
Another possibility for the 'private int apiJpPrice = ;' problem is that
you have nullable integer fields.  The jdbc target isn't very smart
about them -- the resulting field spec will be for a primitive element
with a default value of "", resulting in what you see above.  If this is
the problem, you need to get rid of the default="" attribute and add a
javaType="object" attribute so that the object can be set null when the
field is NULL.

Hope this helps...

        Gary

[2003-09-17 08:32 -0400] brian janaszek (bjanaszek@collaborativefusion.com)...:

> On Wed, 2003-09-17 at 05:02, Amit Rana wrote:
> > Hi,
> > 
> > 	I am using the latest release and followed following steps
> 
> Latest version meaning 3.1?  I've had a lot of problems with 3.0 and the
> OM class generation -- mostly in the way of syntax errors in the
> generated code.
> 
> > 1. created xml schema of our existing tables using "jdbc" ant task
> > //then other steps to create id table, init etc.
> > 2. created om classes using "om" ant task
> > 
> > A lot of classes generated had following kinds of compile errors:
> > private Date renewaldate = new Date(0000-00-00 00:00:00);
> > private int apiJpPrice = ;
> > 
> > Is there something I can do to avoid this problem? I have to go to each
> > class and try to correct these mistakes to make it compile successfully.
> > 
> 
> This could a problem within in the Torque code generation templates,
> which has probably been corrected in 3.1 (where the code generation
> classes were separated).
> 
> It may do you well to search the tubine-user archives, as most Turbine
> users are also Torque users.  
> 
> HTH
> b
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message