title: Simple join from two table mysql in one entity
body: <p>I'm trying to create an entity in JPA from two tables:</p>
  
  <p>Book</p>
  
  <pre><code>+----+------+--------+-------------+
  | id | name | author | releaseData |
  +----+------+--------+-------------+
  |  1 | bla  | bla    | 01/01/1970  |
  |  2 | bla  | bla    | 01/01/1970  |
  |  3 | bla  | bla    | 01/01/1970  |
  |  4 | bla  | bla    | 01/01/1970  |
  |    |      |        |             |
  +----+------+--------+-------------+
  </code></pre>
  
  <p>stock</p>
  
  <pre><code>+---------+----------+--+
  | book_id | quantity |  |
  +---------+----------+--+
  |       1 |       10 |  |
  |       2 |       12 |  |
  |       3 |        5 |  |
  |       4 |        9 |  |
  |         |          |  |
  +---------+----------+--+
  </code></pre>
  
  <p>I would like to create a book entity like this:</p>
  
  <pre><code>
  @Entity
  public class Book {
  
      @Id
      @GeneratedValue
      private int    id;
      private String name;
      private String author;
      private Date   releaseDate;
  
      @JoinTable  
      private Integer   quantity;
  
  }
  
  </code></pre>
  
  <p>And take the value of quantity from the other table</p>
  
  <p>is this possible?</p>
  
  <p>Thanks !</p>