Iam writing a native query like
Query query =
entityManagerUtil.getEntityManager().createNativeQuery(\"SELECT c.NodeID,c.Code,c.Name FROM COM_Location c\"
I had a similar issue, my sql is this
Query nmspQuery = em.createNativeQuery("select aster from MyTable where my_column = 1001")
The datatype for PRODUCT_NODE_ONIX_TYPE in the Oracle 11g is nvarachar2
I fixed it by casting the value astr to to_char. This worked fine
Query nmspQuery = em.createNativeQuery("select TO_CHAR(aster) from MyTable where my_column = 1001")