createQuery deprecated means we're phasing out HQL?

I am using hibernate-core-6.1.3.Final. I had a method that used session.createQuery, but Netbeans 15 marks createQuery as deprecated. The workaround uses a CriteriaQuery object and avoids using HQL. The CriteriaQuery solution is much less user-friendly. Is Hibernate phasing out HQL? Is there still a place where a method takes an HQL string? I would prefer to use HQL over a CriteriaQuery object.

Hi @esharris ,

no HQL is not going to be phased out, simply this method has been deprecated in favour of createSelectionQuery or createQuery(String, Class)

1 Like