title: Access field with @Transient in JPA query
body: <p>I have an entity with a transient attribute:</p>
  
  <pre><code>@Entity
  @Table(name = "asset")
  public class Asset {
      @Transient
      private String locationIdentifier = "N/A";
  
      @SuppressWarnings("unused")
      @PostLoad
      private void onPostLoad() {
          if (location != null) {
              locationIdentifier = location.getIdentifier();
          }
      }
  
     [other stuffs]
  
     }
  </code></pre>
  
  <p>I tried to access <code>locationIdentifier</code> this way in JPA:</p>
  
  <pre><code>String sqlString = "SELECT asset FROM Asset WHERE asset.locationIdentifier = :inputstr";
  Query query = entityManager.createQuery(sqlString);
  </code></pre>
  
  <p>But I got an error: <code>Cannot resolve the property locationIdentifier</code></p>
  
  <p>I want to ask how I access <code>locationIdentifier</code> using JPQL?</p>
  
  <p>Sorry for my English. Thanks in advance!</p>