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: default="" generates 'varname = ;'
Date Wed, 26 Nov 2003 22:13:45 GMT
Hi Jan --

I didn't look closely at your example (busy! busy!  eek!) but I believe
I know the problem.  You have a nullable integer value somewhere.
Torque ALWAYS provides a default value, nullable or not.  In this case
the value is "", which somehow gets turned into the result you're
seeing.  I see this so much I have an XSLT script for fixups, it is
attached, hope it is some use.  Also, if you want to improve the script
that would be great as I'm pretty much an idiot about XSLT!

Regards,

        Gary

p.s. There's a section in the script that changes *BINARY to
LONGVARCHAR; my particular application has no true binary fields but
uses *BLOB types to avoid the string-specific rules in *TEXT.

[2003-11-26 17:53 +0100] Jan Krabbenbos (jan.krabbenbos@planet.nl) wrote:

> Hi
> 
> I have a MySQL database which I generated the schema from. I changed the name 
> into genDB-schema.xml, added the name and defaultIdMethod in the top of the 
> schema, see the snippet below. Now I generate the object model with 'ant -f 
> build-properties.xml om' and than try compiling it. For the given table below 
> it comes with the following error message
> 
>     [javac] 
> /home/jan/jbproject/MetaVis/src/java/com/intellisource/intellivis/metavis/BaseKlantendata.java:44:

> illegal start of expression
>     [javac]     private long kdvolgnr = ;
> 
> If I add a default value of e.g. 0, it compiles. What have I done wrong? Did I 
> miss something?
> 
> <database
>     name="genDB"
>     defaultIdMethod="none">
> :
> :
> <table name="klantendata">
>         <column default="0" name="klantdataSet" primaryKey="true"
>             required="true" type="BIGINT"/>
>         <column default="" name="kdVolgnr" primaryKey="true"
>             required="true" type="BIGINT"/>
>         <column default="" name="kdKey" required="true" size="50"  
> type="VARCHAR"/>
>         <column default="" name="kdValue" required="true" size="100" 
> type="VARCHAR"/>
>         <column default="" name="klantdataStamp" type="TIMESTAMP"/>
>     </table>
> :
> :
> </database>
> -- 
> Met vriendelijke groet,
> 
> Jan Krabbenbos
> 
> ---------------------------------------------------------------------
> 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