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.

猜你喜欢

转载自fhqllt.iteye.com/blog/1204367