[ https://issues.apache.org/jira/browse/IBATIS-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501208 ]
Andrea Pantaleoni commented on IBATIS-434: ------------------------------------------ please try to read carefully this page http://www.mysql.org/doc/refman/5.0/en/connector-j-reference-type-conversions.html if you modify the create table in this way: CREATE TABLE `bug` ( `id` tinyint(4) default NULL ) ENGINE=INNODB; abator creates a correct bin; public class Bug { /** * This field was generated by Abator for iBATIS. * This field corresponds to the database column bug.id * * @abatorgenerated Mon Jun 04 15:19:06 CEST 2007 */ private Byte id; /** * This method was generated by Abator for iBATIS. * This method returns the value of the database column bug.id * * @return the value of bug.id * * @abatorgenerated Mon Jun 04 15:19:06 CEST 2007 */ public Byte getId() { return id; } /** * This method was generated by Abator for iBATIS. * This method sets the value of the database column bug.id * * @param id the value for bug.id * * @abatorgenerated Mon Jun 04 15:19:06 CEST 2007 */ public void setId(Byte id) { this.id = id; } } so the problem is TINYINT(1) and not TINYINT anyway from connector/j the driver I'm using tiniint is correct mapped. thanks > Abator cannot map mysql tinyint data type! > ------------------------------------------- > > Key: IBATIS-434 > URL: https://issues.apache.org/jira/browse/IBATIS-434 > Project: iBatis for Java > Issue Type: Bug > Components: Tools > Environment: mysql 5.0.27 fro windows > Reporter: Andrea Pantaleoni > Priority: Minor > > This happens with the current version of Abator > when Abator try to map a table in mysql database map the tinyint data type > to Object java class > to reapet: > Create table if not exists Example ( > ID tinyint(1) > ) > ENGINE = InnoDB; > Abator will create: > public class Bug { > /** > * This field was generated by Abator for iBATIS. > * This field corresponds to the database column bug.id > * > * @abatorgenerated Mon Jun 04 14:20:19 CEST 2007 > */ > private Object id; > /** > * This method was generated by Abator for iBATIS. > * This method returns the value of the database column bug.id > * > * @return the value of bug.id > * > * @abatorgenerated Mon Jun 04 14:20:19 CEST 2007 > */ > public Object getId() { > return id; > } > /** > * This method was generated by Abator for iBATIS. > * This method sets the value of the database column bug.id > * > * @param id the value for bug.id > * > * @abatorgenerated Mon Jun 04 14:20:19 CEST 2007 > */ > public void setId(Object id) { > this.id = id; > } > } > which is not correct because the type tinyint is mapped to java class Object > Many thanks -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.