title: Yesod/Persistent one-to-one query
body: <p>Say, in Yesod/Persistent, I have models setup like so:</p>
  
  <pre><code>User
      ident Text
      password Text Maybe
      UniqueUser ident
  Question
      title Text
      asker UserId Eq
  </code></pre>
  
  <p>And I have a list of <code>Question</code>s, and would like to retrieve the corresponding list of <code>User</code>s. How would I go about doing this?</p>
  
  <p>I've thought about joins, but those are one-to-many, not one-to-one (I suppose it doesn't matter, but I'd like a simpler solution). Manually doing the join is also an option, but I'm worried about performance - I have</p>
  
  <pre><code>questions &lt;- runDB $ selectList [QuestionTitle !=. ""] [LimitTo 10]
  let askerIds = map (\(Entity _ q) -&gt; questionAsker q) questions
  askers &lt;- sequence $ map (runDB . get) askerIds
  let questionsAndAskers = zip questions askers
  </code></pre>
  
  <p>but I'm worried about using <code>runDB</code> in the <code>map</code> (wouldn't it make a separate request to the database for each user?)</p>
  
  <p>Is there a better/more idiomatic way to achieve this?</p>