JPA QuerySyntaxException: unexpected token: xxx near

错误:QuerySyntaxException: unexpected token: salaryDate near line 1, column 22

问题:使用的是entityManager.createQuery()方法但是查询却用sql语句,没有使用hql语句

解决:

  1. entityManager.createQuery()方法使用hql语句查询
  2. entityManager.createNativeQuery()方法使用sql语句查询
相关推荐
苏渡苇6 小时前
DeepSeek V4 实战:打造一个智能 Java 项目源码分析助手
springboot·jdk21·spring ai·deepseek·deepseek v4
玛卡巴卡ldf2 天前
【Springboot9】将业务模块数据导出为PDF
pdf·springboot
阿冰冰呀3 天前
互联网大厂Java求职面试实录:谢飞机的“水货”之路
java·mybatis·dubbo·springboot·线程池·多线程·hashmap
下次再写7 天前
Java互联网大厂面试技术问答实战:涵盖Java SE、Spring Boot、微服务及多场景应用
java·数据库·缓存·面试·springboot·microservices·技术问答
程序员老邢7 天前
【技术底稿 18】FTP 文件处理 + LibreOffice Word 转 PDF 在线预览 + 集群乱码终极排查全记录
java·经验分享·后端·pdf·word·springboot
DavidSoCool7 天前
Springboot AI 创建MCP Server
java·spring·ai·大模型·springboot·mcp
下次再写9 天前
互联网大厂Java面试三轮技术问答及详解——涵盖Spring Boot与微服务
java·springboot·microservices·interview
吕永强10 天前
基于SpringBoot+Vue校园报修系统的设计与实现(源码+论文+部署)
vue·毕业设计·springboot·毕业论文·报修系统·校园报修
Flittly12 天前
【SpringSecurity新手村系列】(3)自定义登录页与表单认证
java·笔记·安全·spring·springboot