I have a native query to select datafrom database, I'm using postgrsql, hibernate and spring boot with java ... I'm trying to find an user according to some criterias in where clause but i get the "No Dialect mapping for JDBC type: 1111"
error caused by the json field, how can i overcome this error?
and this is my code:
EntityManager em = entityManagerFactory.createEntityManager();
List<Object[]> resultat = new ArrayList<>();
String sqlString = "SELECT u.name, u.age, u.address, u.phone, u.activated FROM user as u ";
Query query = em.createNativeQuery(sqlString);
List<User> resultats = query.getResultList();
em.close();
the user entity has name is a text, age is a number, address is an address object and phone is a json object.
(for some reasons i need to clean the value of listOperators using regular expression and it works on posgrsql).
the dialect that I'm using in my application.properties
is spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
I will appreciate your help, thanks in advance.