We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
This function here needs to reset/remove LIMIT/OFFSET before it runs it's query.
This function https://github.com/contributte/datagrid/blob/master/src/DataSource/DoctrineDataSource.php#L71
Should look like this:
public function getCount() { if ($this->usePaginator()) { return (new Paginator($this->getQuery()))->count(); } $data_source = clone $this->data_source; $data_source->select(sprintf('COUNT(%s)', $this->checkAliases($this->primary_key))); $data_source->resetDQLPart('orderBy'); // these two functions are needed $data_source->setFirstResult(null); $data_source->setMaxResults(null); return (int) $data_source->getQuery()->getSingleScalarResult(); }
Without pagination reset you get exception: Doctrine\ORM\NoResultException: No result was found for query although at least one row was expected
Doctrine\ORM\NoResultException: No result was found for query although at least one row was expected
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This function here needs to reset/remove LIMIT/OFFSET before it runs it's query.
This function
https://github.com/contributte/datagrid/blob/master/src/DataSource/DoctrineDataSource.php#L71
Should look like this:
Without pagination reset you get exception:
Doctrine\ORM\NoResultException: No result was found for query although at least one row was expected
The text was updated successfully, but these errors were encountered: