当前使用版本(必填,否则不予处理)

v3.4.0

该问题是如何引起的?(确定最新版也有问题再提!!!)

之前数据库是 MySQL,使用 tinyint(1),boolean 转换正常,但是换成 postgresql后,使用 varchar(1) 就报错:

ERROR: value too long for type character varying(1); nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(1)

检查发现在 mybatis 里面是 boolean 型,没有对 0、1 做转换

所以想问下,这个在 postgresql 下是否是直接使用 boolean 型?

Comment From: someok

实践证明,postgresql 下逻辑删除字段可以使用 Integer,但是不能使用 Boolean。

数据库字段使用 int,而不能使用 boolean