title: Mapping / Join with @Transient entity field HQL
body: <p>I have these entities:</p>
  
  <pre><code>  @Entity
    @Table(name = "my_table")
    public class MyTable implements Serializable {
  
       @Id
       @Column(name = "RECORD_ID")
       private Long recordId;
  
       @Column(name = "CNAME")
       private String changeName;
  
       @Transient
       MyTableTwo tableTwo;
  
       //getters and setters
   }
  </code></pre>
  
  <p>MyTableTwo entity:</p>
  
  <pre><code>  @Entity
    @Table(name = "my_table_two")
    public class MyTableTwo implements Serializable {
  
       @Id
       @Column(name = "REC_ID")
       private Long recId;
  
       @Column(name = "CNAME")
       private String changeName;
  
       @Column(name = "CVAL")
       private String changeValue;
  
       //getters and setters
   }
  </code></pre>
  
  <p>I want to get <code>my_table.record_id</code>. 'my_table.cname', 'my_table_two.cval' in a result.
  How to write a query on these two entities?</p>
  
  <p>Can we write a join query with first entity and @transient entity field of 2nd entity?</p>
  
  <p>I need to write HQL</p>