ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nullptr rejected" <curious.develo...@gmail.com>
Subject Data Truncation even with ParameterMap
Date Tue, 29 Jul 2008 20:45:49 GMT
I am receiving the following error during an insert:

Data truncation: Data too long for column 'IsStd'

This is in a MySQL table, the column is defined as:

Name: IsNormal, Datatype: BIT, Nullable: NOT NULL


The map looks like this:

INSERT INTO Example(IsNormal)
VALUES(#normal:BIT#)


The Java parameterClass looks like this:

class Example {
  private boolean normal;
  public boolean isNormal() { return normal;}
  public void setNormal(boolean normal) { this.normal = normal; }
}


I have tried changing the #normal:BIT# with
#normal:TINYINT#
#normal:BOOLEAN#

Nothing seems to work correctly. According to the iBATIS DataMapper
documentation, it should support this functionality, and the MySQL connector
also claims support for this, and I am at a loss as to what I am doing
wrong.

Any assistance is very much appreciated.

Mime
View raw message