I've used the latest sql2java 2.6.6 version against the existing mysql schema. The got compilation errors on gerated java codes.
1. tinyint(1) was mapped to boolean and zero (0) was set as default value. It should have been byte.
2. float was mapped to Float and 0 integer was set as default value instead of (Float)0.0. It should have been type cast.
3. DECIMAL(4,2) with default value 0.00 resulted as incomplete BigDecimal mapping.
4. DECIMAL(7,2) mapped to BigDecimal correctly but missing import java.math.BigDecimal
I had to manually add each table/columns default values in the sql2java.xml file. It is really cumbersome in the large schema.
This was not case in the earlier version. Not sure, it was caused by default value and BigDecimal fixes in the 2.6.6
I am wondering is there way to turn off the default value assignments.
I really appreciate any help on this issue.
Thanks, muru
Log in to post a comment.
I've used the latest sql2java 2.6.6 version against the existing mysql
schema. The got compilation errors on gerated java codes.
1. tinyint(1) was mapped to boolean and zero (0) was set as default value.
It should have been byte.
2. float was mapped to Float and 0 integer was set as default value instead
of (Float)0.0. It should have been type cast.
3. DECIMAL(4,2) with default value 0.00 resulted as incomplete BigDecimal
mapping.
4. DECIMAL(7,2) mapped to BigDecimal correctly but missing import
java.math.BigDecimal
I had to manually add each table/columns default values in the sql2java.xml
file. It is really cumbersome in the large schema.
This was not case in the earlier version. Not sure, it was caused by
default value and BigDecimal fixes in the 2.6.6
I am wondering is there way to turn off the default value assignments.
I really appreciate any help on this issue.
Thanks,
muru