title: Hibernate Many to Many Mapping with Additional Column?
body: <p>I need to have additional column in manytomany generated table as</p>
  
  <p>there are 2 entities which are related with each other as many to many
  (User ManytoMany Group)</p>
  
  <pre><code>@Entity
  public class User {
      //other fields
      private Set&lt;Group&gt; groups = new HashSet&lt;Group&gt;(0);
  }
  
  @Entity
  public class Group {
      //other fields
      private Set&lt;User&gt; users = new HashSet&lt;User&gt;(0);
  }
  </code></pre>
  
  <p>So here it generates 3 tables in database as</p>
  
  <p>table1 - User</p>
  
  <p>table2 - Group</p>
  
  <p>table3 - UserGroup</p>
  
  <p>Now I need additional field in UserGroup table, so how to specify that and in which entity?</p>
  
  <p>Additonal field will be</p>
  
  <p>private boolean isThisUserIsGroupManager;</p>
  
  <p>So that, i can get that user of this group is a group manager also.</p>