换成pg数据库后,有些不适配,如何解决

Blade 未结 1 389
tuanzhang
tuanzhang 剑侠 2025-02-28 14:23

image.png

{

    "code": 500,

    "success": false,

    "data": {},

    "msg": "\n### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: operator does not exist: integer ~~ character varying\n  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.\n  Position: 66\n### The error may exist in org/springblade/develop/mapper/CodeSettingMapper.java (best guess)\n### The error may involve defaultParameterMap\n### The error occurred while setting parameters\n### SQL: SELECT COUNT(*) AS total FROM blade_code_setting WHERE (category LIKE ?)\n### Cause: org.postgresql.util.PSQLException: ERROR: operator does not exist: integer ~~ character varying\n  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.\n  Position: 66\n; bad SQL grammar []"

}


我看数据库是category 字段是数字型的,我换成pg库了,就不支持like了

image.png


我想问,现在这个sql在哪?在mapper中没有,如何解决

1条回答
代码语言
提交回复