3

I recently migrated from Spring Boot 1.3.6 to 1.4.0. Now I get several warnings of the same kind in my logfile:

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)].

The warnings are caused by my spring-data repositories. Some methods are using userdefined queries like

@Query("select ... where ... member of ...")

and others have queries derived by methode names like

List<...> findBy...Contains(...);

The question/answer How to remove Hibernate deprecation warning message shows how to prevent the message for userdefined queries. But it also states that its valid JPQL. What is the recommended way handle this warning?

Community
  • 1
  • 1
bfeater
  • 91
  • 1
  • 2

1 Answers1

1

It is a bug in Hibernate which has been fixed in 5.1.5 and 5.2.7.

You will need to update to Spring Boot 2.x. Even Spring Boot 1.5.14 still has Hibernate 5.0.12. However, Spring Boot 2.0.3 has Hibernate 5.2.17.

Wim Deblauwe
  • 25,113
  • 20
  • 133
  • 211