| According to my understanding of the [JPA 2.1 specification](http://download.oracle.com/otn-pub/jcp/persistence-2_1-fr-eval-spec/JavaPersistence.pdf) 3.10.13 Positional Parameters: ordinal parameters should be 1 based. Even for native queries. I raised the issue at [StackOverflow ](http://stackoverflow.com/questions/37973915/hibernate-positional-parameters-zero-based) In the code snippet below, parameter index should be 1 not 0.
Query query = entityManager.createNativeQuery("select * from Game g where title = ?");
query.setParameter(0, GAME_TITLES[0]);
List list = query.getResultList();
With hibernate 4.2.6 this is working correctly I added a small Arquillian test to demonstrate the problem When using indexed ordinal parameter this works
Query query = entityManager.createNativeQuery("SELECT * FROM Game g WHERE title = ?1");
query.setParameter(1, GAME_TITLES[0]);
|