Native SQL queries containing positional parameter references that are different from JPA positional parameters (i.e. they don't use '?' as the prefix) aren't handled correctly by Hibernate. Example:
Query query = em.createNativeQuery( "SELECT * FROM TABLE t WHERE column = $1" );
query.setParameter( 1, "value" );
leads to
although it's a valid native query for HANA. |