public function repository(RepositoryInterface $table = null)
    {
        if ($table === null) {
            deprecationWarning(
                'Using Query::repository() as getter is deprecated. ' .
                'Use getRepository() instead.'
            );

            return $this->getRepository();
        }

        $this->_repository = $table;

        return $this;
    }