Regression of Criteria Query Treat for multi-tier type hierarchy

Description

In the two listed affects versions, a regression has been discovered which was not present in versions in the 4.3.x stream previous to these. The problem affects an entity domain with a three tier type hierarchy where the middle tier has a treated property and we are expecting to get back all of the root super-type in the from. Here is the test case to illustrate this:

This results in no records found due to the query generated containing an odd addition restriction (1=2):

On previous versions (e.g. 4.3.4), this same code generates the following correct query:

Environment

Java version "1.7.0_65", "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

OSX Yosemite

Activity

Show:
Steve Ebersole
February 16, 2016, 9:04 PM

So then this is missing in the change log...

Vlad Mihalcea
February 16, 2016, 9:18 PM

I'm afraid so. Sorry for that.

Gail Badner
February 16, 2016, 10:19 PM

I see that the PR only changes SingleTableEntityPersister. Is there a similar problem with other types of inheritance?

Maxime Falaize
February 19, 2016, 4:59 PM

Sorry I didn't check other classes. I was focused on the bug and on my debugger (trying to understand all the code )...

Johannes Neubauer
February 24, 2016, 12:30 PM
Edited

This bug seems to be related to HHH-10488.

Assignee

Unassigned

Reporter

Matt Todd

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Blocker
Configure