We're updating the issue view to help you get more done. 

Criteria query built with restriction on treated join "Unable to locate Attribute"

Description

Below query

1 2 3 Join<Object, QualityProject> project = cb.treat(emp.join("projects"), QualityProject.class); cq.select(emp) .where(cb.gt(project.<Integer>get("qualityRating"), 5));

causes

1 Unable to locate Attribute with the the given name [qualityRating] on this ManagedType [org.projpa2.chapter9.model.Project]

Attached the test project

Environment

None

Status

Assignee

Unassigned

Reporter

Cuneyt Tuna

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.0.8
5.1.0
4.3.8

Priority

Major