keClaimedTicketMapDB :: [CommentId] -> DB (Map CommentId TicketClaiming)
makeClaimedTicketMapDB comment_ids =
    fmap (M.fromList . map (\(Value x, Entity _ y) -> (x, y))) $
    select $
    from $ \tc -> do
    where_ (tc ^. TicketClaimingTicket `in_` valList comment_ids)
    return (tc ^. TicketClaimingTicket, tc)

-- | Given a collection of CommentId, make a flag map. Comments that are
-- not flagged will simply not be in the map.
m
makeClaimedTicketMapDB :: [CommentId] -> DB (Map CommentId TicketClaiming)
makeClaimedTicketMapDB comment_ids =
    fmap (M.fromList . map (\(Value x, Entity _ y) -> (x, y))) $
    select $
    from $ \tc -> do
    where_ (tc ^. TicketClaimingTicket `in_` valList comment_ids)
    return (tc ^. TicketClaimingTicket, tc)

-- | Given a collection of CommentId, make a flag map. Comments that are
-- not flagged will simply not be in the map.
makeClaimedTicketMapDB comment_ids =
    fmap (M.fromList . map (\(Value x, Entity _ y) -> (x, y))) $
    select $
    from $ \tc -> do
    where_ (tc ^. TicketClaimingTicket `in_` valList comment_ids)
    return (tc ^. TicketClaimingTicket, tc)

-- | Given a collection of CommentId, make a flag map. Comments that are
-- not flagged will simply not be in the map.