title: Referencing a join table to a view
body: <p>I have an entity MorningMinutesNote which has a @ManyToMany relationship with MorningMinutesNoteType using a join table morning_minutes_note_item_type.</p>
  
  <pre><code>@Entity
  @Table(name = "morning_minutes_note", schema = "public")
  public class MorningMinutesNote {
    private List&lt;MorningMinutesNoteType&gt; itemTypes = new ArrayList&lt;MorningMinutesNoteType&gt;();
  
    @ManyToMany
    @JoinTable(name="morning_minutes_note_item_type",
          joinColumns=@JoinColumn(name="morning_minutes_note_id",updatable=false,insertable=false),
          inverseJoinColumns=@JoinColumn(name="item_type_id",updatable=false,insertable=false))
    public List&lt;MorningMinutesNoteType&gt; getItemTypes() {
      return itemTypes;
    }
  </code></pre>
  
  <hr>
  
  <pre><code>CREATE TABLE morning_minutes_note_item_type(
    morning_minutes_note_item_type_id BIGINT PRIMARY KEY DEFAULT NEXTVAL('morning_minutes_note_item_type_id_seq'),
    morning_minutes_note_id BIGINT NOT NULL,
    item_type_id BIGINT NOT NULL
  );
  </code></pre>
  
  <p>I created a view table view_morning_minutes_note which uses morning_minutes_note as the main table. How can I reference the List of MorningMinutesNoteType
  to the view table also so that I can also fetch the List from ViewMorningMinutesNote. I don't know if this is possible but I've tried adding the exact annotations of MorningMinutesNote
   to ViewMorningMinutesNote but it is fetching nothing.</p>
  
  <pre><code>@Entity
  @org.hibernate.annotations.Entity(selectBeforeUpdate = false,dynamicInsert = true, dynamicUpdate = true)
  @Table(name = "view_morning_minutes_note", schema = "public")
  public class ViewMorningMinutesNote{
  
    private List&lt;MorningMinutesNoteType&gt; itemTypes = new ArrayList&lt;&gt;();
  </code></pre>