日期:2014-05-16  浏览次数:20687 次

ibatis mysql 字段 tinyint(1) map应用要小心

http://www.mysqlab.net/docs/refman/en-5.1/page/connector-j-reference-type-conversions.html

?

MySQL Type Name Return value of GetColumnClassName Returned as Java Class
BIT(1) (new in MySQL-5.0) BIT java.lang.Boolean
BIT( > 1) (new in MySQL-5.0) BIT byte[]
TINYINT TINYINT java.lang.Boolean if the configuration property tinyInt1isBit is set to true (the default) and the storage size is 1, or java.lang.Integer if not.