title: How to add fields to POJO in Hibernate?
body: <p>I have three tables: </p>
  
  <pre><code>1. Catalog (PK: id, name, FK: genre_id, FK: type_id)
  2. Type (PK: id, name)
  3. Genre (PK: id, name)
  </code></pre>
  
  <p>How to use <code>Hibernate</code> to connect <code>Genre</code> and <code>Type</code> to <code>Catalog</code> by using annotation?</p>
  
  <pre><code>@Entity
  @Table(name = "catalog")
  public class Catalog implements Serializable {
  
      @Id
      @Column(name = "id")
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      @Column(name = "product_name")
      private String productName;
  
      private Genre genre; // to add 
      private Type type;   // to add
  
      ...
  }
  </code></pre>