javax.persistence.query.timeout hint is not fully supported

Description

From what I understand, this hint is supposed to be propagated from the EntityManager to all queries and ORM operations executed by that EntityManager.

At present, the hint is only propagated to queries created using createQuery(String), and not to queries created using any other create*Query method, nor to any ORM operations, like find() and so on.

It's clear in the code why this is so. The createQuery(String) method calls applyProperties(Query) to apply hints to the query, whereas createQuery(String, Class) does not:

org.hibernate.jpa.spi.AbstractEntityManagerImpl.java

Environment

None

Status

Assignee

Unassigned

Reporter

Steve Dodd

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure