protected function execute()
{
$builder = clone $this->queryBuilder;
$table = $builder->getFromAlias();
if (!$this->distinct) {
$builder->select("[{$table}.*]");
} else {
$builder->select("DISTINCT [{$table}.*]");
}
$result = $this->connection->queryArgs($builder->getQuerySql(), $builder->getQueryParameters());
$this->result = [];
while ($data = $result->fetch()) {
$this->result[] = $this->repository->hydrateEntity($data->toArray());
}
}