title: Update List of entities in one query jpa
body: <p>I need to update a list of objects in one query.
  I have class Parent which has a list of Child in ManyToMany relation.
  I need to update a list of Parent by setting children list to empty(remove all children references from join table).
  Currently i'm setting children list to empty and updating each entity in a query with a merge action,but when i have a large list of pharmacies there are too many queries.</p>
  
  <p>i tried this query: </p>
  
  <blockquote>
    <p><code>update Parent p set p.children=:children where p in (:parents)</code></p>
  </blockquote>
  
  <p>where :children is a <code>new HashSet&lt;Child&gt;</code></p>
  
  <p>but it gives me error </p>
  
  <blockquote>
    <p>unexpected end of subtree</p>
  </blockquote>
  
  <p>Is there any way to update a list in one query ? I'm using jpa entity manager.
  Thanks.</p>