keTicketMapDB
    :: (Foldable c)
    => c CommentId -> DB (Map CommentId (Entity Ticket))
makeTicketMapDB comment_ids = fmap (foldr step mempty) $
    select $
    from $ \t -> do
    where_ (t ^. TicketComment `in_` valList comment_ids)
    return t
  where
    step t = M.insert (ticketComment (entityVal t)) t


makeTicketMapDB
    :: (Foldable c)
    => c CommentId -> DB (Map CommentId (Entity Ticket))
makeTicketMapDB comment_ids = fmap (foldr step mempty) $
    select $
    from $ \t -> do
    where_ (t ^. TicketComment `in_` valList comment_ids)
    return t
  where
    step t = M.insert (ticketComment (entityVal t)) t
makeTicketMapDB comment_ids = fmap (foldr step mempty) $
    select $
    from $ \t -> do
    where_ (t ^. TicketComment `in_` valList comment_ids)
    return t
  where
    step t = M.insert (ticketComment (entityVal t)) t