public function findAllBy(array $wheres, array $options = [])
    {
        $query = $this->getSqlObject()->select();

        $this->setColumns($query, $options);

        $wheres = $this->addJoins($query, $wheres, $options);

        $this->addWheres($query, $wheres, $options);

        $page = Arr::get($options, 'page');

        if ($page && !Arr::get($options, 'order')) {
            throw new LogicException('Must provide an ORDER BY if using pagination');
        }

        if (Arr::get($options, 'order')) {
            $this->setOrder($query, $options['order']);
        }

        if ($page) {
            $paginationData = $this->getPaginationData($query, $options);
            // Set LIMIT and OFFSET
            $query->limit($paginationData->getResultsPerPage());
            $query->offset(($page - 1) * $paginationData->getResultsPerPage());
        }

        $entityIterator = $this->executeAndGetResultsAsEntityIterator($query);

        if ($page) {
            $entityIterator->setPaginationData($paginationData);
        }

        return $entityIterator;
    }