T3rm1 (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZGJkZjk2NjM0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16930?atlOrigin=eyJpIjoiZGJkZj...
) HHH-16930 (
https://hibernate.atlassian.net/browse/HHH-16930?atlOrigin=eyJpIjoiZGJkZj...
) Return type of createQuery() not validated any more (
https://hibernate.atlassian.net/browse/HHH-16930?atlOrigin=eyJpIjoiZGJkZj...
)
Issue Type: Bug Affects Versions: 6.2.6 Assignee: Unassigned Attachments: bug.zip Created:
12/Jul/2023 06:00 AM Priority: Major Reporter: T3rm1 (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
List<A> aList = entityManager.createQuery("""
select new org.hibernate.bugs.Result(a, b) from A a
join B b ON a.bSpecialId = b.specialId
""", A.class).getResultList();
The query returns a org.hibernate.bugs.Result but the second parameter of createQuery is
A.class , which is wrong. However, Hibernate does not report an error. The same code does
throw an IllegalArgumentException with Hibernate 5.6.15.
Test case is attached.
(
https://hibernate.atlassian.net/browse/HHH-16930#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16930#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100231- sha1:2d13be9 )