首页 > 其他分享 >Mybatis查询报错 foreach 子查询 (invalid comparison)

Mybatis查询报错 foreach 子查询 (invalid comparison)

时间:2023-10-03 14:04:03浏览次数:37  
标签:lang comparison String invalid 查询 报错

Mybatis查询报错

invalid comparison: java.lang.String and [Ljava.lang.String;

原因

去掉黄色部分

<if test="null != businessType and '' != businessType">

   and t.businessType in


         <foreach collection="businessType" item="bt" index="index" open="(" close=")" separator=",">

             '${bt}'

         </foreach>

</if>

 


标签:lang,comparison,String,invalid,查询,报错
From: https://blog.51cto.com/u_16274468/7691771

相关文章

  • SqlServer数据库分页查询问题排查
    使用docker安装下载镜像dockersearchmssql-serverdockerpulldatagrip/mssql-server-linux创建容器dockerrun-d--namesqlserver-p1433:1433-e'ACCEPT_EULA=Y'-e'SA_PASSWORD=szz123456'datagrip/mssql-server-linuxACCEPT_EULA需要设置为Y以接受SQL......
  • mysql在安装group_replication插件时,报错ERROR 1126"can't open share library xxxx g
    问题描述:mysql在安装group_replication插件时,报错ERROR1126"can'topensharelibraryxxxxgroup_replication.so",如下所示:数据库:MySQL8.0.27系统:rhel7.31、问题重现mysql>INSTALLPLUGINgroup_replicationSONAME'group_replication.so';ERROR1126(HY0......
  • 用sql语句查询出表结构,在结果就能看到数据库所有表的结构,这个时候只要全选,然后右击出
    SELECT表名=CaseWhenA.colorder=1ThenD.nameElse''End,表说明=CaseWhenA.colorder=1Thenisnull(F.value,'')Else''End,字段序号=A.colorder,字段名=A.name,字段说明=isnull(G.[value],......
  • 满查询
    开启慢查询setglobalslow_query_log=1;setlong_query_time=0;这里开启慢查询,并将时间设置为0秒结果示例Time这是查询发生的时间,格式为ISO8601。在这个例子中,查询发生在2023年10月2日,4:58:36.987985。User@Host这是执行查询的用户和主机。在这个例子中,用户是root,......
  • mysql单表查询操作
    本文列举数据库的单表查询语法及实际使用,以员工表和部门表作为举例:部门表:dept点击查看创建部门表sqlcreate table `dept`  (  `deptno` int(2) not null,  `dname` varchar(14),  `loc` varchar(13),  primary key (`deptno`));员工表:emp点击查看创建......
  • MySQL中explain查询结果解析
    ExtraUsinginde表示查询只需要使用索引就可以获取所需的数据,不需要回表操作。这通常是性能较好的情况。Usingwhere表示查询使用了WHERE子句来过滤结果集。查询将先根据索引进行扫描,然后再使用WHERE条件过滤结果。Usingtemporary表示查询需要使用临时表来存储中间结果。......
  • 03_nodejd_npm install报错
    npminstall报错npmERR!codeERESOLVEnpmERR!ERESOLVEunabletoresolvedependencytreenpmERR!npmERR!Whileresolving:[email protected]!Found:[email protected]!node_modules/vuenpmERR!vue@"2.5.17"fromtherootprojectnpmERR!......
  • DOSBox0.74使用Debug时p命令报错
    环境操作系统:Windows10DOSBox0.74DEBUG.EXE从WindowsXP或其他复制到的DOSBox下问题在学习到王爽的《汇编语言》时,第4章,第5章用到了debug中的p命令。但是,在自己的环境下,debug程序的p命令直接报错!可能的原因首先,p命令报错,应该是debug程序的问题。除了这个问......
  • 项目实战:ES的增加数据和查询数据
    文章目录背景在ES中增加数据新建索引删除索引在ES中查询数据查询数据总数量项目具体使用(实战)引入依赖方式一:使用配置类连接对应的es服务器创建配置类编写业务逻辑----根据关键字查询相关的聊天内容在ES中插入数据总结提升背景最近需要做一个有关查询聊天记录的功能,通过资料了解到......
  • SpringBoot框架大晚上报错404--我的路径问题(附上SpringBoot MVC管理系统的简单具体代
    代码application.ymlspring:web:resources:static-locations:classpath:/static/,classpath:/templates/datasource:type:com.alibaba.druid.pool.DruidDataSourceurl:jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=utf......