String literals in an HQL query can get mangled

Description

When calling Session.createQuery() with the query string
"FROM Phase phase WHERE phase.comment= 'This is a test, Phase 1'"
it is turned into
"FROM com.example.Phase phase WHERE phase.comment= 'This is a test, com.example.Phase 1'"
as shown by log output in the QueryTranslatorImpl. This is, to put it mildly, highly surprising and undesirable behaviour.

The trigger seems to be the sequence <Comma Space Entity-Name>, which triggers a transformation of the entity name into the fully qualified class name even in string literals, where that has no business happening whatsoever.

Environment

None

Status

Assignee

Andrea Boriero

Reporter

Daniel Gudlat

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.0.7
4.1.9

Priority

Major
Configure