【spring data jpa】jpa中使用in查询或删除 在@Query中怎么写 ,报错:org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'goodsConfigUid' cannot be found on null 怎么处理
示例代码如下:
@Modifying
@Transactional
@Query("delete from GoodsBindConfigMapping gbc " +
"where gbc.goodsConfigUid = :#{#bean.goodsConfigUid} " +
"and gbc.tenementId = :#{#bean.tenementId} " +
"and gbc.goodConfigFlag = :#{#bean.goodConfigFlag} "+
"and gbc.goodTypeUid in (:#{#bean.goodsList})")
int deleteByConfigUidAndTypeUid(@Param("bean") BindConfigBean bean);
报错:
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'goodsConfigUid' cannot be found on null
解决方法:
是因为在使用@Query写语句的时候,没有使用@Param()标明参数实体
【spring data jpa】jpa中使用in查询或删除 在@Query中怎么写 ,报错:org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'goodsConfigUid' cannot be found on null 怎么处理的更多相关文章
- 【spring data jpa】使用jpa的@Query,自己写的语句,报错:org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'status' cannot be found on null
报错: org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'status' ...
- 【Elasticsearch】ES中时间查询报错:Caused by: ElasticsearchParseException[failed to parse date field [Sun Dec 31 16:00:00 UTC 2017] with format [yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis]];
ES中时间查询报错:Caused by: ElasticsearchParseException[failed to parse date field [Sun Dec 31 16:00:00 UTC ...
- Spring Data Solr创建动态域报错:org.springframework.data.solr.UncategorizedSolrException
今天在项目中使用Spring Data Solr导入动态域数据报错, 控制台打印错误信息如下 Exception in thread "main" org.springframew ...
- 查询和删除数据表中反复数据的sql
1.查询表中反复数据. select * from people where peopleId in (select peopleId from people group by ...
- 【spring boot】使用注解@ConfigurationProperties读取配置文件时候 报错 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rocketmqAutoConfiguration': Unsatisfied dependenc
如题,配置文件如下: #注册中心配置 eureka: instance: instanceId: ${spring.application.name}:${random.int} hostname: ...
- 【spring cloud】spring cloud 使用feign调用,1.fallback熔断器不起作用,2.启动报错Caused by: java.lang.ClassNotFoundException: com.netflix.hystrix.contrib.javanica.aop.aspectj.Hystri解决
示例GitHub源码地址:https://github.com/AngelSXD/springcloud 1.首先使用feign调用,需要配置熔断器 2.配置熔断器需要将熔断器注入Bean,熔断器类上 ...
- mysql中PDO参数化引号引起的Warning: PDOStatement::execute(): SQLSTATE[HY093]:报错
sql语句之前是这样写的:INSERT INTO tablename SET a = ':a',b = ':b',c = ':c',d = :d,e = :e $data = array ( [':a ...
- 报错org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybatis.spring.SqlSessionFactoryBean]
超级大坑 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybati ...
- eclipse中运行python脚本中有注释为中文的内容,报错:SyntaxError: Non-ASCII character '\xe5'
'''Created on 2015年7月2日 @author: liujuan'''import sysreload(sys) 以上为注释的有个日期中文的,结果运行报错:SyntaxError: N ...
随机推荐
- NPOI的使用Excel模板导出 可插入到指定行
Excel模版建议把需要添加数据行的样式设置好 模版样式,导出后效果 [2017-11-22 对获取需插入数据的首行样式有时为空报错修改] /// <summary> /// 根据模版导出 ...
- 如何完全禁用或卸载Windows 10中的OneDrive
该功能占用很大的内存与CPU 详见http://os.51cto.com/art/201508/489371.htm
- mysql七:数据备份、pymysql模块
阅读目录 一 IDE工具介绍 二 MySQL数据备份 三 pymysql模块 一 IDE工具介绍 生产环境还是推荐使用mysql命令行,但为了方便我们测试,可以使用IDE工具 下载链接:https:/ ...
- measure time program
#include <time.h> int delay(int time) { int i,j; for(i =0;i<time;i++) for(j=0;j<10000;j+ ...
- Linux内核设计与实现读书笔记(8)-内核同步方法【转】
转自:http://blog.chinaunix.net/uid-10469829-id-2953001.html 1.原子操作可以保证指令以原子的方式执行——执行过程不被打断.内核提供了两组原子操作 ...
- time_t转化成日期格式小工具
time_t转化成日期格式小工具下载 http://files.cnblogs.com/files/lansan0701/TimeTool.zip
- PL/SQL 03 流程控制
--IF语法IF condition THEN statements;[ELSIF condition THEN statements;][ELSE statements;]END IF; -- ...
- 热安装NGINX并支持多站点SSL
https://www.moonfly.net/801.html http://www.centoscn.com/image-text/config/2015/0423/5251.html 1.查看n ...
- 使用System.getProperty("line.separator")时没有换行问题解决
项目中要实现替换模版txt文本里面的内容,然后生成新的文档,其中先把模版文本的内容通过创建的 BufferedReader bufReader 使用 readLine() 来一行一行读取,所以在完成替 ...
- 【计算机网络】http状态码
100-199 用于指定客户端应相应的某些动作. 200-299 用于表示请求成功. 300-399 用于已经移动的文件并且常被包含在定位头信息中指定新的地址信息. 400-499 用于指出客户端的错 ...