Issue Details (XML | Word | Printable)

Key: TORQUE-80
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Thomas Fischer
Reporter: Brian Telintelo
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Torque

Default Values with an empty string in the schema results in bad source generation for number types

Created: 27/Jan/07 11:58 PM   Updated: 02/Feb/07 09:52 PM
Return to search
Component/s: Generator
Affects Version/s: None
Fix Version/s: 3.3

Time Tracking:
Not Specified

Resolution Date: 02/Feb/07 09:52 PM


 Description  « Hide
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))

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Thomas Fischer added a comment - 02/Feb/07 09:52 PM
Patch applied. Thanks a lot.