You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
Right now we need to fetch all the entries (in my case over 400 entries and have to filter them afterwards)
Or would you suggest creating a custom filter which would do this for me?
This leads me to the next question: Why do we get 10 results even if we say paginate=false?
Talking about ResultsBuilder::fetchResults() public function fetchResults($query, $page = 1, $maxPerPage = 10, $filter = false, $paginate = false)
We need to set a setMaxPerPage so we have to keep a random big number any time we want to fetch all records.
I would assume that deactivating the pagination would give me all results. Forget about my assumption, how would you suggest getting all results?
Edit:
I thought of another way to fetch all entries:
$qb->field('createdAt')->gt('1800-01-01 00:00:00'); // given this is a timestamp that is acceptable
$qb->field('createdAt')->lt('3000-01-01 00:00:00');
which also requires keeping two dates just in case we need to do fetch all.
The text was updated successfully, but these errors were encountered:
How do we fetch the latest entry:
These don't help with that, an option could be something like:
It would just add
select max('field') ...
Right now we need to fetch all the entries (in my case over 400 entries and have to filter them afterwards)
Or would you suggest creating a custom filter which would do this for me?
This leads me to the next question:
Why do we get 10 results even if we say paginate=false?
Talking about ResultsBuilder::fetchResults()
public function fetchResults($query, $page = 1, $maxPerPage = 10, $filter = false, $paginate = false)
We need to set a
setMaxPerPage
so we have to keep a random big number any time we want to fetch all records.I would assume that
deactivating
the pagination would give me all results. Forget about my assumption, how would you suggest getting all results?Edit:
I thought of another way to fetch all entries:
which also requires keeping two dates just in case we need to do fetch all.
The text was updated successfully, but these errors were encountered: