NullPointerException when parsing HQL with "? in elements(...)"

Description

I am reporting this as a bug because Hibernate does not explain me what is wrong with my HQL syntax and instead leaves a NPE in the wild.

I found that my syntax contains a trivial error (not referencing properties of associated ManyToOne eager relationship)

Input

Wrong HQL is

Correct HQL is

Movimento class properties:

  • contoCorrente: POJO ContoCorrente @ManyToOne

  • dataValuta: java.util.Date

ContoCorrente properties:

  • organizationId: string

  • associatedUsers: Set<String>

Exception

Expected result

An exception that tells there is no such property "organizationId" in class Movimento (because it is a property of movimento.contoCorrente relationship)


I propose this suitable for new contributors because I deem such NPE handling very easy to address

Environment

MYSQL

Activity

Show:
Bogdan Calmac
July 26, 2016, 10:38 PM
Edited

mistype, disregard.

Assignee

Unassigned

Reporter

Antonio Anzivino

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure