JPA Hibernate Call Postgres Function Void Return MappingException:

前端 未结 7 2072
不知归路
不知归路 2020-12-31 11:38

I have a problem where I am getting an: org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 when trying to call a postgres function using JPA cre

7条回答
  •  独厮守ぢ
    2020-12-31 12:00

    Dude! It's as easy as quoting the function name. Like so:

    public void runRequestCleanup() {
        String queryString = "SELECT \"a_function_that_hibernate_chokes_on\"()";
        Query query = em.createNativeQuery(queryString);
        Object result = query.getSingleResult();
    }
    

提交回复
热议问题