Issue Type: Bug Bug
Affects Versions: 3.6.10
Assignee: Unassigned
Components: entity-manager
Created: 13/Mar/13 7:45 AM
Description:

The Parameter instances created for a JPQL query are inconsistent in terms of that they carry the positional indexes as names:

Query query = em.createQuery("select u from User u where u.firstname like ?1");
Parameter<?> parameter = query.getParameter(1);

assertThat(parameter, is(notNullValue()));
assertThat(parameter.getPosition(), is(1));
assertThat(parameter.getName(), is(nullValue()));

The two last assertions essentially fail as the returned parameter instance carries the name "1" but no index which is inconsistent as I just looked up the parameter through the index.

To verify this do the following:

1. {{git clone https://github.com/SpringSource/spring-data-jpa}}
2. cd spring-data-jpa
3. git checkout hibernate-bug
4. mvn clean test -Dtest=HibernateIntegrationTests

Project: Hibernate ORM
Priority: Major Major
Reporter: Oliver Gierke
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira