Fix ambiguous SQL error when using UserId.