No operator matches the given name and argument types

news/2024/7/9 21:37:12 标签: 数据库, postgresql, mybatis

No operator matches the given name and argument types

前置环境:

报错具体信息:

### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = character varying 建议:No operator matches the given name and argument types. You might need to add explicit type casts. 位置:215 ### The error may exist in com/slb/support/outbound/db/mapper/MenuMapper.java (best guess) ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: SELECT id,system_code,name,service_key,path,http_method,api_path,"level",pid,sort,type,kind,permission,icon,label,flag,del_flag,create_time,update_time,create_by,update_by FROM menu WHERE del_flag=0 AND (pid = ? AND type = ?) ### Cause: org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = character varying 建议:No operator matches the given name and argument types. You might need to add explicit type casts. 位置:215 ; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = character varying 建议:No operator matches the given name and argument types. You might need to add explicit type casts. 位置:215

解决办法:

  • 传入参数类型是string, 实际参数类型是long,将参数转换为long类型即可。

在这里插入图片描述

问题原因:

  • 传入参数类型和实体类当中定义的参数类型不一致导致的报错,参数类型转化即可。

参考文档:

  • https://blog.csdn.net/qq_33833327/article/details/107693932

http://www.niftyadmin.cn/n/912080.html

相关文章

NHibernate.3.0.Cookbook第四章第6节的翻译

Using the Hibernate Query Language 使用Hibernate查询语言(HQL) 到目前为止,我们已经讨论了使用NHibernate的Criteria API和她的新的QueryOver语法的各种查询.NHibernate提供了另外一个更强大的方法,名为Hibernate Query Language,一个融合了熟悉的sql样式的语法与面向对象思…

在线工具

脚本之家在线工具集:http://tools.jb51.net/转载于:https://www.cnblogs.com/thinheader/p/9472695.html

python——装饰器例子一个

1 ##装饰器2 #!/usr/bin/env python3 4 from time import ctime , sleep5 6 def tsfunc(func):7 def wrappedFunc():8 print [%s] %s called %(ctime(), func.__name__)9 return func() 10 return wrappedFunc11 12 13 tsfunc14 def foo():15 pas…

大学生python实验心得体会_最新大学生实验心得体会范文汇总

大学生实验心得体会范文汇总实验讲授有助于培养学生求真务实的科学精神。学习不仅需要智力、能力,更需要求真务实的科学精神。下面给大家分享一些关于学生实验心得体会,方便大家学习。学生实验心得体会1时间真的流逝很快。我们也走过了大二的时光。在学习的我们,体会到了酸与甜…

大数据小项目之电视收视率企业项目08--》MapReduce编写之Wordcount

编程规范 (1)用户编写的程序分成三个部分:Mapper,Reducer,Driver(提交运行mr程序的客户端) (2)Mapper的输入数据是KV对的形式(KV的类型可自定义) (3&#xff…

卷积神经网络的结构_CNN卷积神经网络层级结构

卷积神经网络层次结构包括:数据输入层/ Input layer卷积计算层/ CONV layer激励层 / ReLU layer池化层 / Pooling layer全连接层 / FC layer输入层(Input layer)输入数据,通常会作一些数据处理,例如:去均值:把输入数据…

p1862

文件夹里都堆了20多道没改完的题了,我却又来开了一个新题。 好在一节课时间做出来了。 求刚好放满m的方案数。这个到是我没做过的,捣腾了半天弄出来转移方程 ans[0]1; ans[f]ans[f-o[i]]; 对于n个物品容积为m的背包跑一遍需要m*n的时间,这样子…

MailKit和MimeKit 收发邮件

新建项目,引用MailKit和MimeKit NuGet包 using CommonTool.MailKit; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace ProjectDemo.ConsoleApp {class Program{static void Main(s…