SQL异常:exist: integer = character varying

2023-05-16

最近在使用mybatis的时候遇到了这样的错误
SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying No operator matches the given name and argument type(s). You might need to add explicit type casts.
一开始我以为是实体类和数据库的映射有问题,然后一个个去对发现并没有错。
最后发现原来是入参的dataId和实体类的dataId参数类型不一致,如下是我的入参类型为String

 @ApiModelProperty(name = "propertyId", value = "属性id", required = true)
 private String propertyId;

但是我实体类存储的是int4类型,所以导致产生此异常

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

SQL异常:exist: integer = character varying 的相关文章

随机推荐