title: JPA: How do I synchronize the persistence context with the result of the bulk update or delete?
body: <p>There's a statement in the ejb-3_0-fr-spec-persistence.pdf which reads</p>
  
  <p><strong><em>The persistence context is not synchronized with the result of the bulk update or delete</em></strong></p>
  
  <p>So if I do a query.executeUpdate which deletes rows from a table. Those same rows still exist in another entities one to many collection. When I restart the application, I see the phantom entities are now removed from the collection.</p>
  
  <p>So is there a (nice\simple\generic) way of synchronizing JPA's cache with the result of a bulk update\delete ? </p>
  
  <p>BTW. Im using EclipseLink, version: Eclipse Persistence Services - 1.1.0.r3634.</p>
  
  <p>Thanks,</p>
  
  <p>Phil.</p>