title: Selecting some of One where there're none of Many
body: <p>I'm trying to find domains that don't have any usernames with a given name, that is free domains. Hopefully there's a solution to this that doesn't require 2 separate queries, but I also ran into a problem with type system.</p>
  <pre><code>-- error Couldn't match type 'IO [Domain]' with '[[Domain]]', points to beginning of filter
  
              Just term -&gt; do
                  usernames &lt;- query @Username
                      |&gt; filterWhere (#name, term) |&gt; fetch &gt;&gt;= collectionFetchRelated #domainId
                  domains &lt;- search |&gt; filter \x-&gt;case find (\y-&gt;get #domainId x == get #domainId y) usernames of
                      Just _ -&gt; True
                      Nothing -&gt; False
                  render IndexView {..}
  </code></pre>