title: JPA not creating database entry for many to many relationship
body: <p>I have these 2 classes (shortened):</p>
  <pre><code>@Entity
  public class ClanPlayer {
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Id
      private int id;
      @ManyToMany(mappedBy = &quot;players&quot;)
      private List&lt;PhoenixPermission&gt; permissions = new ArrayList&lt;&gt;();
  
      public ClanPlayer() {}
  
      public List&lt;PhoenixPermission&gt; getPermissions() {
          return permissions;
      }
  
      public void setPermissions(List&lt;PhoenixPermission&gt; permissions) {
          this.permissions = permissions;
      }
  
      public void addPermission(PhoenixPermission permission) {
          EntityManager em = EMUtils.getEntityManager();
          em.getTransaction().begin();
          permissions.add(permission);
          em.getTransaction().commit();
      }
  }
  </code></pre>
  <p>and</p>
  <pre><code>@Entity
  public class PhoenixPermission {
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Id
      private int id;
      @ManyToMany
      @JoinTable(name = &quot;PLAYER_PERMISSION&quot;)
      private List&lt;ClanPlayer&gt; players = new ArrayList&lt;&gt;();
  
      public PhoenixPermission() {}
  
      public List&lt;ClanPlayer&gt; getPlayers() {
          return players;
      }
  
      public void setPlayers(List&lt;ClanPlayer&gt; players) {
          this.players = players;
      }
  }
  </code></pre>
  <p>Now, while calling the <code>addPermission</code> method with a PhoenixPermission-Entity object, the ArrayList 'permissions' is updated, but there is no new tuple in the database of the 'PLAYER_PERMISSION' table.</p>
  <p>The debug log doesn't show any insert queries for this table.
  All other Entity Manager operations are working fine.
  I assume there is something wrong with my annotations, but I am not sure about.
  Any ideas?</p>