title: Open JPA : An error occurred while parsing the query filter 'MY_QUERY' Error message: No field named "accessAuthorizationVs" in class "MyEntityClass"
body: <p>I have configured it in my Rational Software Architect 8.0.4, by enabling the JPA 1.0 facet. It autogenerates almost all my entity classes except for the id's. So I manually add them. I am trying to query a simple table APP_USER that has one-to-many relation to ACCESS_AUTHORIZATION table. See below for the configurations and entity classes.</p>
  
  <p><img src="https://i.stack.imgur.com/UNH14.png" alt="Relationship between my tables during the auto entity generation process"></p>
  
  <p><img src="https://i.stack.imgur.com/GAknL.png" alt="APP_USER Entity"></p>
  
  <p><img src="https://i.stack.imgur.com/zXIdn.png" alt="enter image description here"></p>
  
  <p>When I try to execute a simple named query which is </p>
  
  <pre><code>SELECT a.accessAuthorizationVs, a.empName, a.userCnum FROM AppUserEntity a WHERE a.userCnum = :userCnum
  </code></pre>
  
  <p>It throws an exception</p>
  
  <pre><code>**org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "SELECT a.accessAuthorizationVs, a.empName, a.userCnum FROM AppUserEntity a WHERE a.userCnum = :userCnum". Error message: No field named "accessAuthorizationVs" in class "class com.xxx.xxx.xxx.services.integration.entity.AppUserEntity".**
      at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:118)
      at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.traversePath(AbstractExpressionBuilder.java:284)
      at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getPath(JPQLExpressionBuilder.java:1382)
      at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getPathOrConstant(JPQLExpressionBuilder.java:1337)
  </code></pre>
  
  <p>Here's a snapshot of my persistence.xml:</p>
  
  <p><img src="https://i.stack.imgur.com/cNtox.png" alt="enter image description here"></p>
  
  <p>Can anyone guide me what I am doing wrong here? The field by that name is clearly defined in my entity class. Also I would like to mention that I had to enhance the classes[followed <a href="http://openjpa.apache.org/openjpaeclipseenhancementbuilder.html" rel="nofollow noreferrer">this] </a>as there was an earlier error about classes not being enhanced.</p>