title: JPA: SqlResultSetMapping and transient field
body: <p>I need to map a result field into an entity field.</p>
  
  <pre><code>@Entity
  @Table (name="my_table")
  @Cacheable(true)
  @Data
  @SqlResultSetMapping(name="MyResult", 
      entities = {
          @EntityResult(entityClass=MyClass.class,
          fields   = {@FieldResult(name="customName", column="customName")})
      }, 
      columns  = {@ColumnResult(name="customName")})
  public class MyClass implements Serializable {
      private static final long serialVersionUID = 1L;
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private int id;
      private short model;
      private String reference;
      @Lob
      @Column(columnDefinition="TEXT")
      private String content = "";
      @Column(length=64, columnDefinition="CHAR(64)")
      private String hash;
  
      @Transient
      private String customName = ""; //this is the column I want to map
  }
  </code></pre>
  
  <p>I know that <code>@Transient</code> is ignored by JPA but when I remove it I got this exception:</p>
  
  <pre><code>org.hibernate.HibernateException: Missing column: customName in my_db.my_table
  </code></pre>
  
  <p>My query is like this:</p>
  
  <pre><code>em.createNativeQuery("SELECT * FROM MyView WHERE customer=:c","MyResult")
      .setParameter("c", 12345).getResultList();
  </code></pre>
  
  <p>Table:</p>
  
  <pre><code>id  int(11) AI PK
  reference   varchar(16)
  model   smallint(5)
  content text
  hash    char(64)
  </code></pre>
  
  <p>My view:</p>
  
  <pre><code>SELECT id,model,reference,content,hash,name AS customName,customer FROM (
  (SELECT p.*, NULL AS name, customer FROM p_part p, p_order o, general_order go WHERE o.part=p.id AND o.id=go.id)
  UNION
  (SELECT p.*, name, customer FROM p_part p, p_order o, p_name n, general_order go WHERE o.part=p.id AND n.part=p.id AND o.id=go.id)
  ) u ORDER BY
      model, reference;
  </code></pre>
  
  <p>How can I map customName from the ViewResult?</p>