db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Telintelo (JIRA)" <j...@apache.org>
Subject [jira] Updated: (TORQUE-80) Default Values with an empty string in the schema results in bad source generation for number types
Date Sun, 28 Jan 2007 05:24:49 GMT

     [ https://issues.apache.org/jira/browse/TORQUE-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brian Telintelo updated TORQUE-80:
----------------------------------

    Description: 
Using a mysql database, a data type that is numerical, but has no default value results in
the schema generation to have default="".  This causes the om generator to create java file
that are declared like int customerID = ;  This causes a compile error.  

To fix, just change org.apache.torque.task.TorqueJDBCTransformTask line 308 from

if (defValue1 != null)

to

if (StringUtils.isNotEmpty(defValue))

  was:
Using a mysql database, a data type that is numerical, but has no default value results in
the schema generation to have default="".  This causes the om generator to create java file
that are declared like int customerID = ;  This causes a compile error.  

To fix, just change org.apache.torque.task. line 308 from

if (defValue1 != null)

to

if (StringUtils.isNotEmpty(defValue))


> Default Values with an empty string in the schema results in bad source generation for
number types
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TORQUE-80
>                 URL: https://issues.apache.org/jira/browse/TORQUE-80
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>            Reporter: Brian Telintelo
>
> Using a mysql database, a data type that is numerical, but has no default value results
in the schema generation to have default="".  This causes the om generator to create java
file that are declared like int customerID = ;  This causes a compile error.  
> To fix, just change org.apache.torque.task.TorqueJDBCTransformTask line 308 from
> if (defValue1 != null)
> to
> if (StringUtils.isNotEmpty(defValue))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message