java - IN , AND 休眠中的查询
问题描述
我想使用hibernate查询spring boot。但是我在条件和标准上都试过了,但似乎不起作用。
我想做一个 SQL 查询:SELECT * FROM db1_test.device where user_id in " + customerIds + ") and 'app_id' like '%text-v2%
如果我将它输入到 MYSQL 中,它应该可以工作。user_id
是用户输入的字符串。
我收到了这个错误:
org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
解决方案
推荐阅读
- akka - 如果使用 `ask` 模式而不是 `tell` 模式,Akka ShardRegion 会成为性能瓶颈吗?
- kotlin - 领域(kotlin):查询具有至少一个孩子具有非空字段的孩子列表的对象
- algorithm - 从 1 到 k 中选择数字使其总和等于 n 的方法有多少?
- r - 如何创建行的子集,直到条件为 False 并继续这样做?
- reactjs - 如何在 React 中为每个关闭的手风琴选项卡添加滚动到顶部动画?
- google-data-studio - 表中的 Analytics 值与时间序列中的值不同
- php - 将多个csv数据中的数据导入一张主表
- javascript - .env Nuxt JS 无法正确解析生成选项中的路由
- ios - iOS 从用户文档 Firebase Firestore 存储/更新和检索位置数据
- javascript - Crossfilter1.4.6 过滤器喜欢用数组维度时不起作用,过滤器功能后仍然可以得到数组为空的行