| I got to this topic after some while and I was surprised that "Hibernate suddenly works", but it's not that easy. There are cases that work without problem. On H2 I tried:
em.createQuery(
"select d.name, function('dayname', d.died) from Dog d ", Object[].class)
.getResultList()
And this worked (d.died is LocalDate with converter). But when I used function('random', d.id) it failed with aforementioned java.lang.IllegalStateException: No data type for node again. I have no idea what confuses Hibernate about this random function when dayname works fine. It definitely is not usage of literal (d.id is not literal). |