title: Symfony generates a lot of queries during form handleRequest, each for every collection item
body: <p>I have Entity, let's call it "Group" that has a collection of Items.
  Every item has relation to SubItem. So summarizing, it looks like:</p>
  
  <pre><code>Group {
    Items: Collection [
      Item { SubItem },
      Item { SubItem },
      ...
      Item { SubItem },
    ]
  }
  </code></pre>
  
  <p>I have created a form where I can create/edit such group by <strong>CollectionType</strong>, you can give it name and add/remove Item(s). I can load such form with just one query, but when I send the form, symfony fires one query per SubItem in Item in collection, event if SubItems are all the same, the queries looks like:</p>
  
  <pre><code> SELECT 
     ... (all fields list)
   FROM 
     subItem s0_ 
   WHERE 
     s0_.id IN (?)
  </code></pre>
  
  <p>So giving an example: </p>
  
  <p><a href="https://i.stack.imgur.com/1NYEF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1NYEF.png" alt="Example form data"></a></p>
  
  <p>It will produce 4 of those queries:</p>
  
  <pre><code>SELECT ... FROM subItem s0_ WHERE s0_.id IN ('SubItemA.id')
  SELECT ... FROM subItem s0_ WHERE s0_.id IN ('SubItemB.id')
  SELECT ... FROM subItem s0_ WHERE s0_.id IN ('SubItemB.id')
  SELECT ... FROM subItem s0_ WHERE s0_.id IN ('SubItemB.id')
  </code></pre>
  
  <p>I don't use <strong>WHERE IN()</strong> in any of my DQL. Do you have any Idea where it comes form or how to track those down?</p>
  
  <p><strong>EDIT:</strong> I found something out. SubItem is EntityType, and when I set 'query_builder' with order by DESC/ASC, it does appear in those queries. But still I don't know why and where <strong>WHERE id IN()</strong> comes from. And those queries are only about Subitems sent in form. Whole list that populates EntityType field is longer.</p>
  
  <p><strong>Edit 2:</strong> Those queries seems to be just queries that check if chosen entity exists. I started using ChoiceType instead with model transformer, I feed my form witch $id => $entity array so I can transform back from id to entity, and I need to grab entities list only once, not once per EntityType field as symfony does. </p>