title: Syntax error in JPA query
body: <p>When I execute the following code</p>
  
  <pre><code>return entityManager
              .createQuery("select a from Article where a.slug = ?1", Article.class)
              .setParameter(1, slug)
              .getSingleResult();
  </code></pre>
  
  <p>I get the following exception</p>
  
  <pre><code>java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager: 
  Exception Description: Syntax error parsing the query [select a from Article where a.slug = '?1'], line 1, column 22: syntax error at [where].
  Internal Exception: MismatchedTokenException(77!=78)
      at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1328)
  </code></pre>
  
  <p>I'm using JPA 2 with EclipseLink 2.0.2.</p>
  
  <p>What is wrong with my query?</p>