【发布时间】:2016-12-31 18:47:33
【问题描述】:
我最近从 Spring Boot 1.3.6 迁移到 1.4.0。现在我在我的日志文件中收到了几个相同类型的警告:
org.hibernate.orm.deprecation: HHH90000016: Found use of deprecated 'collection property' syntax in HQL/JPQL query [null.elements]; use collection function syntax instead [elements(null)].
这些警告是由我的 spring-data 存储库引起的。有些方法使用用户定义的查询,例如
@Query("select ... where ... member of ...")
其他人的查询由方法名称派生,例如
List<...> findBy...Contains(...);
问题/答案How to remove Hibernate deprecation warning message 显示了如何阻止用户定义查询的消息。但它也声明其有效的 JPQL。 处理此警告的推荐方法是什么?
【问题讨论】:
标签: hibernate spring-boot spring-data