I'm running the following as part of the where clause of an HQL query:
:timeToTopOfList = ((CAST((j.displayed_position - 1) AS FLOAT) / jp.openings_per_month) * 30)
When I run it in SQL Management studio it works just fine, but when I run it through eclipse I get the following error:
Caused by: java.lang.NullPointerException org.hibernate.dialect.function.CastFunction.render(CastFunction.java:55)
I'm also using JPA, and according to this answer you cannot convert types if you're using JPA. Is that true?
I really need to divide two int value columns as a float.