- 博客(5)
- 资源 (1)
- 收藏
- 关注
原创 记一则Spring Data JPA的多条件查询语法
这里只讲@Query里多条件 存在空情况的判断(如果项目有跨数据情况,不建议使用下面方法)首先对于Mysql数据库可以参考一下: @Query(value = "select t.* from T t where if (?1 is null,1=1,t.id = ?1) ", nativeQuery = true) Page<T> findAllDiction...
2019-08-06 12:28:36
611
原创 java.lang.IllegalArgumentException: Cannot convert value of type [] to required type [] for propert
主要是Spring的bean有重名的,导致映射错误命名一定要规范
2017-07-14 11:27:52
719
原创 identifier of an instance of bean was altered from 1 to 2(持久化对象ID变更)
今天遇到个怪问题,hibernate修改外键id时出现:org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of xx altered from 2677 to 2672; nested exception is org.hibernate.HibernateExcepti
2017-07-14 10:32:40
1731
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人