You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Jeff Butler (JIRA)" <ib...@incubator.apache.org> on 2007/06/04 14:47:36 UTC
[jira] Commented: (IBATIS-434) Abator cannot map mysql tinyint
data type!
[ https://issues.apache.org/jira/browse/IBATIS-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501199 ]
Jeff Butler commented on IBATIS-434:
------------------------------------
I don't believe this is a bug - the JDBC driver probably reports this field as Object type because TINYINT is not a standard JDBC type.
In your configuration for this table, you'll have to add a <columnOverride> element to specify the type you desire (java.lang.Short, java.lang.Integer, etc.)
Also - please use the mailing lists for support questions!
> 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.