title: JPA: how to composite an entity from columns of multiple tables (not save an entity to mulitple tables)
body: <p>I have two entities:</p>
  
  <pre><code>@Entity
  @Table(name="TableA")
  public class TableA {
       @Id
       @Column(name="id")
       long id;
  
       @Column(name="tableB_id")
       long tbId;
  
       @Column(name="column1", table="TableB")
       String tbColumn1; 
  }
  
  @Entity
  @Table(name="TableB")
  public class TableB {
       @Id
       @Column(name="id")
       long id;
  
       @Column(name="column1")
       String column1; 
  }
  </code></pre>
  
  <p>TableA has a foreign key 'tbId' to TableB.id. And TableB has a column named "column1", now I want to get "column1" in TableA entity by some sort of join. What's way I should go in terms of JPA? This is not OneToOne as I don't want to wire entire TableB entity in TableA.</p>