Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
) *commented* on HHH-16489 (
https://hibernate.atlassian.net/browse/HHH-16489?atlOrigin=eyJpIjoiNmE0MG...
)
Re: Hibernate native query returns duplicate column values with addScalar() call (
https://hibernate.atlassian.net/browse/HHH-16489?atlOrigin=eyJpIjoiNmE0MG...
)
Well, what addScalar is doing is telling Hibernate that the native query has an
“additional” scalar result, of the type you specify. Are you saying that in 5 this was not
the case? Maybe a reproducer test case for this would give us insight into the problem.
In any case, since you should always indicate the result class in createNativeQuery (the
method without type information has been deprecated since 6.0) I think the behavior is
correct, and the addScalar call should simply be avoided.
(
https://hibernate.atlassian.net/browse/HHH-16489#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16489#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#100224- sha1:07bd2b7 )