Avoid logging warnings caused by internal usage of the legacy Criteria API

Description

Hibernate ORM deprecated the old Criteria API in favour of the JPA Criteria API.

Hibernate Search uses the old one internally; not least this might generate warnings at runtime which can't be avoided by the end user.

Environment

None

Activity

Show:
Sanne Grinovero
February 6, 2017, 11:04 PM

It turns out it's not possible to migrate to use the JPA Criteria API without making breaking changes.

The main issue is that we expose the method org.hibernate.search.FullTextQuery.setCriteriaQuery(Criteria): if the user sets a custom Criteria, we'd needto convert that to a JPA Criteria to combine it with our additional restrictions. This conversion is not possible, or extremely tricky.

When Hibernate ORM will introduce SQM we'll have a better and converged representation, at that point we can re-evaluate getting rid of using the legacy Criteria internally.

For now we should just bypass logging the WARN, as end users can't do much about it: rephrased the issue title.

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure