@Formula annotation with native query returning entity value causes NullPointerException
Description
Attachments
1
Activity
Show:
Nathan Xu January 10, 2020 at 1:43 AM
Just saw this ticket has been labeled as the next release version, so it won’t be too long before your PR is reviewed and merged, :)
Nathan Xu January 10, 2020 at 12:22 AM
Seems your PR conflicts with master branch right now. You might well join zulip to push a little bit: https://hibernate.zulipchat.com/#narrow/stream/132094-hibernate-orm-dev
Ryan Murphy January 9, 2020 at 4:42 PM
I had submitted a PR for this awhile back. Not sure what is needed to move it through.

Youssef EL HOUTI January 9, 2020 at 3:52 AM
Wow this is an old unfixes bug…, also interested in a fix please

T3rm1 September 3, 2019 at 11:55 AMEdited
So when does this get fixed? It’s really hard to believe this has existed for over 7 years now. It’s impossible to use a native query on an entity with a @Formula annotataion. That’s not too uncommon.
Tested with 5.3.11
I have an entity. It has the following field,
If i include this column the Query raises below error;
If i remove the Formula it works.
Please find attached debug screenshot.