Say, in Yesod/Persistent, I have models setup like so:
User ident Text password Text Maybe UniqueUser ident Question title Text asker UserId
I haven't type-checked this yet, but I would stick the whole thing inside of runDB:
runDB
runDB $ selectList [QuestionTitle !=. ""] [LimitTo 10] >>= mapM (\qe@(Entity _ q) -> do asker <- get $ questionAsker q return (qe, asker))