<return> elements of <sql-query> are not handled properly when building metadata

Description

Hibernate mappings containing native query definitions like the one below are not handled properly

1 2 3 4 5 6 7 8 <sql-query name="myquery"> <synchronize table="mytable" /> <return alias="e" class="org.some.class.Name" /> <![CDATA[from elephant as {e} where {e.age} > 50]]> </sql-query>

The same problem exists for the <return-join> and <load-collection> elements.

The attached archive contains a project demonstrating the problem.

Environment

None

Status

Assignee

Unassigned

Reporter

Koen Aers

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

5.0.6

Priority

Major