title: JPA Query parameters not working
body: <p>I have a problem with the below JPA query in Apache Deltaspike: </p>
  
  <pre><code>@Query("from PersonPositionViewEntity where forename1 like :forename1 and surname like :surname")
  List&lt;PersonPositionView&gt; search(@QueryParam("forename1") String forename1, @QueryParam("surname") String surname);
  </code></pre>
  
  <p>It always results in the following exception:</p>
  
  <pre><code>Caused by: java.lang.IllegalArgumentException: Parameter with that position [1] did not exist
      at org.hibernate.jpa.spi.BaseQueryImpl.findParameterRegistration(BaseQueryImpl.java:518) ~[hibernate-entitymanager-4.3.8.Final.jar:4.3.8.Final]
      at org.hibernate.jpa.spi.BaseQueryImpl.setParameter(BaseQueryImpl.java:674) ~[hibernate-entitymanager-4.3.8.Final.jar:4.3.8.Final]
      at org.hibernate.jpa.spi.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:198) ~[hibernate-entitymanager-4.3.8.Final.jar:4.3.8.Final]
      at org.hibernate.jpa.spi.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:49) ~[hibernate-entitymanager-4.3.8.Final.jar:4.3.8.Final]
      at org.apache.deltaspike.data.impl.param.IndexedParameter.apply(IndexedParameter.java:40) ~[deltaspike-data-module-impl-1.3.0.jar:1.3.0]
      at org.apache.deltaspike.data.impl.param.Parameters.applyTo(Parameters.java:120) ~[deltaspike-data-module-impl-1.3.0.jar:1.3.0]
      at org.apache.deltaspike.data.impl.builder.AnnotatedQueryBuilder.createJpaQuery(AnnotatedQueryBuilder.java:80) ~[deltaspike-data-module-impl-1.3.0.jar:1.3.0]
      at org.apache.deltaspike.data.impl.builder.AnnotatedQueryBuilder.execute(AnnotatedQueryBuilder.java:48) ~[deltaspike-data-module-impl-1.3.0.jar:1.3.0]
      at org.apache.deltaspike.data.impl.builder.QueryBuilder.executeQuery(QueryBuilder.java:57) ~[deltaspike-data-module-impl-1.3.0.jar:1.3.0]
      at org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeNonTransactional(TransactionalQueryRunner.java:66) ~[deltaspike-data-module-impl-1.3.0.jar:1.3.0]
      at org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeQuery(TransactionalQueryRunner.java:61) ~[deltaspike-data-module-impl-1.3.0.jar:1.3.0]
      at org.apache.deltaspike.data.impl.handler.QueryHandler.invoke(QueryHandler.java:79) ~[deltaspike-data-module-impl-1.3.0.jar:1.3.0]
      ... 84 common frames omitted
  </code></pre>
  
  <p>However if I change it to positional parameters (which I would prefer not to do) it works:</p>
  
  <pre><code>@Query("from PersonPositionViewEntity where forename1 like ?1 and surname like ?2")
  List&lt;PersonPositionView&gt; search(String forename1, String surname);
  </code></pre>
  
  <p>Has anyone come across this before?</p>