db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Holtzman" <j...@joshholtzman.com>
Subject RE: No default values in my Object Model
Date Wed, 16 Apr 2003 19:01:14 GMT
I had a similar problem, where the generated objects were trying to cast
null.  I changed my schema to use objects instead of primitive types,
and this solved the problem:
<database
  name="foo"
  defaultIdMethod="idbroker"
  defaultJavaType="object"
>

Hope this helps,
Josh

===========================
JOSH HOLTZMAN Web Development
http://joshholtzman.com
josh@joshholtzman.com
===========================


> -----Original Message-----
> From: David Hakim [mailto:dhakim@webcodex.com] 
> Sent: Wednesday, April 16, 2003 11:40 AM
> To: torque-user@db.apache.org
> Subject: No default values in my Object Model
> 
> 
> 	Sorry if this a newbie question but I couldn't find 
> anything on it in 
> the docs or mail archive. I used torque to generate an XML 
> schema file 
> from an existing mysql database. I then generated the object 
> model for 
> that database. The object model however will not compile 
> because there 
> are syntax errors in the generated base classes:
> 
>          /**
>           * The value for the print field
>           */
>          private int print = ;
> 
>          /**
>           * The value for the condition field
>           */
>          private byte condition = ;
> 
> 	...
> 
> Any idea what would cause these errors in code generation ? I went 
> through the same process with a SQLServer database the other 
> day (even 
> though there were a couple hangups there in getting torque to 
> generate 
> the XML from the existing mssql schema) however all the generated 
> objects output and compiled correctly .
> 
> Thoughts ?
> -Dave
> 
>   
> 
> 
> ---------------------------------------------------------------------
> 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