assignmentsFor :: Assignment -> UserIdentifier -> IO [ReviewAssignment]
assignmentsFor a r = databaseProviderReviews $ do
    reviews <- selectList [ReviewAssignmentAssignment ==. a, ReviewAssignmentReviewee ==. r] []
    liftIO $ return $ map unwrapEntity reviews

-- | Utility function for unwrapping data from Entity context.
assignmentsFor :: Assignment -> UserIdentifier -> IO [ReviewAssignment]
assignmentsFor a r = databaseProviderReviews $ do
    reviews <- selectList [ReviewAssignmentAssignment ==. a, ReviewAssignmentReviewee ==. r] []
    liftIO $ return $ map unwrapEntity reviews

-- | Utility function for unwrapping data from Entity context.
assignmentsFor a r = databaseProviderReviews $ do
    reviews <- selectList [ReviewAssignmentAssignment ==. a, ReviewAssignmentReviewee ==. r] []
    liftIO $ return $ map unwrapEntity reviews

-- | Utility function for unwrapping data from Entity context.