title: Can Orchard ActivatingFilters be batched?
body: <p>I have a situation where I have a need to display information on a list of Orchard users. In this case, I get a list of Orchard users via a GetMany. </p>
  
  <pre><code>_services.ContentManager.GetMany&lt;UserPart&gt;(setOfAllNeededUsers, VersionOptions.Latest, new QueryHints())
  </code></pre>
  
  <p>(In my case setOfAllNeededUsers is an IEnumerable of the user ids I had from a previous query)</p>
  
  <p>The problem that I'm running into is with the Orchard.Roles module. Orchard.Roles adds an ActivatingFilter to the User type to load the role information for the user. This isn't inherently a problem however the requests for the role information for every user is done individually. Querying an external DB 20, 30, possibly even 100 times to get this information is just not workable. Is there a way to batch these into one request?</p>
  
  <p>NOTE: The following modification to my query doesn't help in any way:</p>
  
  <pre><code>_services.ContentManager.GetMany&lt;UserPart&gt;(setOfAllNeededUsers, VersionOptions.Latest, new QueryHints().ExpandParts&lt;UserRolesPart&gt;())
  </code></pre>