title: QueryException: JPA-style positional param was not an integral ordinal
body: <p>I got "QueryException: JPA-style positional param was not an integral ordinal"
  I try to solve by the way others solve such as <a href="https://stackoverflow.com/questions/44114250/org-hibernate-queryexception-jpa-style-positional-param-was-not-an-integral-ord">org.hibernate.QueryException: JPA-style positional param was not an integral ordinal</a> but it still doesn't work.</p>
  
  <p>I  try to hardcode change form ?1 to some data that already have in the database and it works but after change to ?1 it gives an error again.</p>
  
  <p>--- Before Hardcode (have Error)
  -- In Repository --</p>
  
  <pre><code>@Query(
      value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score " + 
              "FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id " + 
              "WHERE user_att_workshop.user_id = ?1 " + 
              "AND user_att_workshop.workshop_att_id = ?2;", 
              nativeQuery = true
  )
  public List&lt;UserScoreByWorkshopAtt&gt; findUserScoreByUserIdAndWorkshopId(int userId, int workshopId);
  </code></pre>
  
  <p>-- In Service --</p>
  
  <pre><code>public List&lt;UserScoreByWorkshopAtt&gt; findUserScoreByUserIdAndWorkshopIdtest(
      int userId, 
      int workshopId) {
  
      return 
          userScoreByWorkshopAttRepository.findUserScoreByUserIdAndWorkshopId(
          userId,
          workshopId
      );
  }
  </code></pre>
  
  <p>-- In controller --</p>
  
  <pre><code>List&lt;UserScoreByWorkshopAtt&gt; getUserScooreByUserId(
      @PathVariable("user_id") int userId, 
      @PathVariable("workshop_id") int workshopId) {
  
      return userScoreByWorkshopAttService.findUserScoreByUserIdAndWorkshopIdtest(
          userId, 
          workshopId
      );
  
  }
  </code></pre>
  
  <p>--- After Hardcode (can run and have no error)
  -- In Repository --</p>
  
  <pre><code> @Query(value = "SELECT user_att_workshop.id, user_att_workshop.user_id, user_att_workshop.workshop_att_id, skill.skill_name, user_att_workshop.skill_score FROM user_att_workshop LEFT JOIN skill on user_att_workshop.skill_id = skill.id  WHERE user_att_workshop.user_id = 5 AND user_att_workshop.workshop_att_id = 2;", nativeQuery = true)
  public List&lt;UserScoreByWorkshopAtt&gt; findUserScoreByUserIdAndWorkshopId();
  </code></pre>
  
  <p>-- In Service --</p>
  
  <pre><code>public List&lt;UserScoreByWorkshopAtt&gt; findUserScoreByUserIdAndWorkshopIdtest() {
      return userScoreByWorkshopAttRepository.findUserScoreByUserIdAndWorkshopId();
  }
  </code></pre>
  
  <p>-- In controller --</p>
  
  <pre><code>List&lt;UserScoreByWorkshopAtt&gt; getUserScooreByUserId(@PathVariable("user_id") int userId,
              @PathVariable("workshop_id") int workshopId) {
          return userScoreByWorkshopAttService.findUserScoreByUserIdAndWorkshopIdtest();
      }
  </code></pre>
  
  <blockquote>
    <p>Caused by: org.hibernate.QueryException: JPA-style positional param
    was not an integral ordinal   at
    org.hibernate.engine.query.spi.ParameterParser.parse(ParameterParser.java:195)
      at
    org.hibernate.engine.query.spi.ParamLocationRecognizer.parseLocations(ParamLocationRecognizer.java:56)
      at
    org.hibernate.engine.query.internal.NativeQueryInterpreterStandardImpl.getParameterMetadata(NativeQueryInterpreterStandardImpl.java:30)
      at
    org.hibernate.engine.query.spi.QueryPlanCache.getSQLParameterMetadata(QueryPlanCache.java:128)
      at
    org.hibernate.internal.AbstractSharedSessionContract.getNativeQueryImplementor(AbstractSharedSessionContract.java:1000)
      ... 85 more</p>
  </blockquote>