Refine AbstractBaseRepository.