@Covert annotation not honored in Queries for negative values

Description

The @Convert annotation is ignored in specific circumstances when performing HQL (or Criteria) queries.
Specifically, the converter is ignored when querying for negative values, or updating to negative values.

According to our debugging, org.hibernate.hql.internal.ast.tree.BinaryLogicOperatorNode#initialize would expect an ExpectedTypeAwareNode (e.g. a LiteralNode) as right-hand-side (or left-hand-side), but is getting an UnaryOperatorNode in these cases.

See the attached test-case project.

Environment

Spring-Boot 2.1, Java 8, Windows 10, H2DB

Assignee

Unassigned

Reporter

Florian Kirchmeir

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure