| When mapping a Type which uses a non-standard JDBC Type like 1111 (OTHER) or 2003 (ARRAY), even if the Type is properly configured and discovered by Hibernate, The Type is not properly resolved for native SQL queries So, while fetching the Type via JPQL query works fine:
List<String[]> emails = session.createQuery(
"select u.emailAddresses from CorporateUser u where u.userName = :name" )
.setParameter( "name", "Vlad" )
.getResultList();
The same query fails via a native SQL query:
List<String[]> emails = session.createNativeQuery(
"select u.emailAddresses from CorporateUser u where u.userName = :name" )
.setParameter( "name", "Vlad" )
.getResultList();
with the following Exception being thrown:
|