JPA Native Queries with ordinal parameter are zero based

Description

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.

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

Environment

Java 1.8.0_74
Hibernate 5.2.0.Final
Windows 7

Status

Assignee

Andrea Boriero

Reporter

F

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure