I\'m using Spring Boot, Spring Data REST, Hibernate (5.2.12.Final) and I\'m exposing my repositories as REST services.
I\'ve a problem with a query that raises a Nul
Yes there's a bug report for this exact situation with @Formula
annotation and nativeQuery
... you can add 5.2 as an affected version since it's reported only to 5.1
https://hibernate.atlassian.net/browse/HHH-7525
A simple workaround I used (since the one in the issue doesn't work anymore), is use a native query to just retrieve the id, then a normal repository.findOne(id)
to fetch the entity with the formula, double queries, but hey, it works