Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Doesn't work with single row. #2

Open
ilchenkoArtem opened this issue Sep 3, 2022 · 6 comments
Open

Doesn't work with single row. #2

ilchenkoArtem opened this issue Sep 3, 2022 · 6 comments

Comments

@ilchenkoArtem
Copy link

No description provided.

@ilchenkoArtem ilchenkoArtem changed the title Doesn't work with single entity. Doesn't work with single row. Sep 3, 2022
@niklasfjeldberg
Copy link

What do you mean by this? Do you mean that if you limit the number of results with one, you get the same record?
pagination: { limit: 1 }

@ilchenkoArtem
Copy link
Author

@niklasfjeldberg yes

@deBasMan21
Copy link

deBasMan21 commented Apr 8, 2023

@niklasfjeldberg i have the same problem. Do you have a solution for this?

I would like to get one random record when i enable random sorting and limit the response by 1. However it always returns the first record when i do it now.

@niklasfjeldberg
Copy link

@deBasMan21 just don't limit the results, and it will work.

@deBasMan21
Copy link

@niklasfjeldberg but i have a lot of records and i want to improve performance by just getting one. Could there be a change to fix this or should i look for another solution?

@ilchenkoArtem
Copy link
Author

This package dosn't resolve this problem you should write custom controller for Strapi.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants