title: "org.hibernate.QueryException: Unable to resolve path..." error with parametrized queries on JPA
body: <p>I'm having a poblem on the first argument of the following method with the parametrized SQL query:</p>
  
  <pre><code>lista = miDao.find("SELECT c FROM Idioma WHERE c.palabra =:param", o1 , entityManager);
  </code></pre>
  
  <p>where:</p>
  
  <pre><code>String o1= "playa";
  List&lt;Object&gt; lista;
  </code></pre>
  
  <p>The table "Idioma" has 3 columns "palabra", "idioma" and "wordId". The method is expected to look for the word "playa" within the column "palabra" and calls to the following Dao method:</p>
  
  <pre><code>@SuppressWarnings("unchecked")
  public &lt;T&gt; List&lt;T&gt; find(String queryString, Object param, EntityManager em) {
      Query query = em.createQuery(queryString);
      query.setParameter( "param" , param);
      return query.getResultList();
  }
  </code></pre>
  
  <p>When I run the program I'm "rollbacked" with:</p>
  
  <pre><code>Unable to resolve path [c.palabra], unexpected token [c] [SELECT c FROM com.aprendeidiomas.entity.Idioma WHERE c.palabra =:param]
  </code></pre>
  
  <p>I'm sure I have a problem with my parametrized sql query. Even though I have red a lot of documents, I cannot solve my error. Could you pleas tell me what is wrong with my parametrized query?</p>
  
  <p>Thank you very much in advance.</p>