title: JPA: implicit cascades for relationships mapped as @ManyToMany @JoinTable?
body: <p>I have the following mapping:</p>
  
  <pre><code>@Entity
  @Table(name = "Prequalifications")
  public class Prequalification implements Serializable
  {
      ...
  
      @ManyToMany
      @JoinTable(name = "Partnerships", joinColumns = @JoinColumn(name = "prequalification_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "company_id", referencedColumnName = "id"))
      private Set&lt;Company&gt; companies;
  
      ...
  }
  </code></pre>
  
  <p>In a <code>@ManyToMany</code> + <code>@JoinTable</code> mapped relationship, isn't it kind of implicit that the association (link) entities (here <code>Partnerships</code>) are automatically persisted, removed, etc. even though </p>
  
  <blockquote>
    <p>by default, relationships have an empty cascade set</p>
  </blockquote>
  
  <p>? The above quote was taken from "Pro JPA 2, by Mike Keith".</p>
  
  <p>Executing</p>
  
  <pre><code>em.merge(prequalification);
  </code></pre>
  
  <p>on the above entity <strong>does</strong> persist the associated partnerships without any cascade types specified.</p>
  
  <p>Am I correct that this implicit cascade <strong>has</strong> to be performed? This isn't mentioned anywhere I looked...</p>