Add support for JPA criteria on stateless sessions

Description

I'm not sure if this one is a bug or a new feature...

In 5.x, we can only use Hibernate Criteria on a Stateless session, not JPA criteria.

In 6.0, Hibernate criteria are gone, so we cannot use any form of criteria on a stateless session, only string-based queries. This is especially problematic for integrations that rely on the metamodel to build queries automatically, such as the mass indexer in Hibernate Search.

The criteria builder can be accessed through the session factory, so it's not a big deal that there is no getCriteriaBuilder() method on StatelessSession. What's really missing is the createQuery(CriteriaQuery) method on StatelessSession.

Environment

None

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Priority

Major
Configure