title: Using a transient field in HQL
body: <p>I have a field this is mounted in run-time, like a join of another fields. Look: </p>
  
  <pre><code>public String getNumeroCip() {
  
          if (this.getId() == null) {
              return "BR0000000000000";
          }
  
          String idFormated = String.format("%011d", this.getId());
          return "BR" + idFormated + this.produto.getProduto().getSufixo();
      }
  </code></pre>
  
  <p>This is my field, mounted in run-time. I can call it doing: bean.numeroCip. </p>
  
  <p>But if i try use this in a HQL, like this:</p>
  
  <pre><code>@NamedQuery(name = "Ar.findByNumeroArOrCip", query = "SELECT c FROM AR c "
                  + "JOIN FETCH c.produto "
                  + "JOIN FETCH c.situacao "
                  + "WHERE c.numeroAr = :numeroAr OR c.numeroCip = :numeroCip")
  </code></pre>
  
  <p>I got the following error when i try start tomcat server:</p>
  
  <pre><code>Caused by: org.hibernate.HibernateException: Errors in named queries: Ar.findByNumeroArOrCip
  </code></pre>