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

Query does resolve references @AttributeOverride with @ElementCollection

Description

Hi guys,

i have

1 2 3 4 5 6 7 8 9 10 11 12 @Entity(name = "analysis") public class Analysis { ... @Embedded @AttributeOverride(name = "id", column = @Column(name = "cube_id")) private DomainReference cube; // Blending Info @ElementCollection @AttributeOverride(name = "id", column = @Column(name = "cube_id")) private Set<DomainReference> blendedCubes = new HashSet<>();

and

1 2 3 4 @Embeddable public class DomainReference { @Column(columnDefinition = "VARCHAR(36)") private String id;

and when i tries execute

1 entityManager.createQuery("select analys from analysis analys inner join analys.blendedCubes blendedcub1_ where blendedcub1_.id='001'")

i got erro from driver jdbc "Column "BLENDEDCUB1_.ID" not found; SQL statement"

it seems, can not translate the AttributeOverride correctly

Environment

Hibernate 5.4.0.Final

Status

Assignee

Unassigned

Reporter

Lucas Martins

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

5.1.17
4.2.20
5.4.2

Priority

Major