NullPointerException When Using type(<Class>) in HQL

Description

I have recently upgraded to use Hibernate 2.9.Final am upgrading my code to reflect items which are now deprecated.

Specifically, I was seeing the following deprecation notice message:

I have updated my query to use type(rootAlias), and I am seeing a NullPointerException on line 303 in PojoEntityTuplizer. The entityInstance is passed in null from line 70 in DiscriminatorType.

I will update this issue when I have a test in a pull request.

Activity

Vlad MihalceaFebruary 22, 2018 at 8:48 AM

Use the provided test case and issue a fix as well.

Randy MayJanuary 22, 2018 at 3:18 PM

Pull Request with test case created.

Former userJanuary 19, 2018 at 8:11 PM

Please attach a runnable test case. You can find test templates at: https://github.com/hibernate/hibernate-test-case-templates

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created January 18, 2018 at 8:58 PM
Updated February 27, 2018 at 7:59 AM
Resolved February 22, 2018 at 8:48 AM