title: What is the correct CascadeType in @ManyToMany Hibernate annotation?
body: <p>I am trying to model a transient operations solution schema in Hibernate and I am unsure how to get the object graph and behavior I want from the model.</p>
  
  <p>The table structure uses a correlation table (many-to-many) to create lists of users for the operation:</p>
  
  <pre><code>Operation     OperationUsers      Users
  op_id         op_id               user_id
  ...           user_id             ...
  </code></pre>
  
  <p>In modeling the persistent class Operation.java using hibernate annotations, I created:</p>
  
  <pre><code>@ManyToMany(fetch=FetchType.LAZY)
  @JoinColumn(name="op_id")
  public List&lt;User&gt; users() { return userlist; }
  </code></pre>
  
  <p>So far, I have the following questions:</p>
  
  <ol>
  <li>When a user is removed from the list, how do I avoid Hibernate<br>
  deleting the user from the Users table?  It should just be removed<br>
  from the correlation table, not the Users table. I cannot see a valid
  CascadeType to accomplish this.</li>
  <li>Do I need to put anything more in the method body?</li>
  <li>Do I need to add more annotation arguments?</li>
  <li>I am expecting to do this <em>without</em> futzing with the User class.
  Please tell me that I do not have to mess with User.java!</li>
  </ol>
  
  <p>It's possible I'm overthinking this, but that's the nature of learning...  Thanks in advance for any help you can offer!</p>