title: EntityNotFoundException when removing from OneToMany collection
body: <p>I have two entities connected with a bidirectional OneToMany/ManyToOne relationship.</p>
  
  <pre><code>@Entity
  class One {
    @OneToMany(mappedBy = "one", orphanRemoval = true, fetch = FetchType.EAGER)
    private Set&lt;Many&gt; manies;
  
    // ...
  }
  
  @Entity
  class Many {
    @ManyToOne
    @JoinColumn(name = "one_id", nullable = false)
    private One one;
  
    // ...
  }
  </code></pre>
  
  <p>When I want to remove a <code>Many</code> instance, I remove it from its <code>One</code>'s <code>manies</code> <code>Set</code> and delete it from the database. If I take the same <code>One</code> instance and save it again (because I changed anything, it doesn't have to be related to the relationship), I get an exception:</p>
  
  <blockquote>
    <p>javax.persistence.EntityNotFoundException: Unable to find test.Many with id 12345</p>
  </blockquote>
  
  <p>The ID (in this example 12345) is the ID of the just removed entity. Note that removal of the entity 12345 succeeded: The transaction commits successfully and the row is removed from the database.</p>
  
  <p>Adding and removing instances is done with Spring Data repositories. Removing looks more or less like this:</p>
  
  <pre><code>one.getManies().remove(manyToRemove);
  oneDao.save(one);
  manyDao.delete(manyToRemove);
  </code></pre>
  
  <p>I debugged a little and found out that the <code>Set</code> is a Hibernate <code>PersistentSet</code> which contains a field <code>storedSnapshot</code>. This in turn is another <code>Set</code> that still references the removed entity. I have no idea why this reference is not removed from the snapshot but I suspect this is the problem: I think Hibernate tries to remove the entity a second time because it's in the snapshot but not in the actual collection. I searched for quite a while but I didn't encounter others with a similar problem.</p>
  
  <p>I use Hibernate 4.2.2 and Spring Data 1.6.0.</p>
  
  <p>Am I doing something inherently wrong? How can I fix this?</p>