title: JPQL issue updating records
body: <p>Trying to update a record in a database but getting this error:</p>
  <pre><code>Caused by: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.7.4.v20190115-ad5b7c6b2a): org.eclipse.persistence.exceptions.JPQLException
  Exception Description: Problem compiling [UPDATE DATABASE.PROPOSAL p SET p.proposal_for = 10 WHERE p.proposal_id = 1]. 
  [29, 43] The state field cannot be resolved.
  [55, 68] The state field path 'p.proposal_id' cannot be resolved to a valid type.
  </code></pre>
  <p>Code below is responsible for inserting it</p>
  <pre class="lang-java prettyprint-override"><code>public int updateFor(int forCount, Long propId) {
          int newCount = forCount + 1;
          int propIdNew = propId.intValue();
          Query q = em.createQuery(&quot;UPDATE DATABASE.PROPOSAL p SET p.proposal_for = &quot; + newCount + &quot; WHERE p.proposal_id = &quot;+ propIdNew );
          return q.executeUpdate();
      }
  </code></pre>
  <p>Im not sure if there is a type issue with propId being a Long or if i have written the SQL paths wrong or both.</p>