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
It was surprise for me that await strapi.entityService.findMany('api::some-uid') returns the object, but not an array for a singular types. And even docs says the return type Entry[]
Suggested improvements or fixes
Would be great to describe an exclusion note like For singular types "findMany" returns the entry data instead of array of entries.
Or even better to allow use findOne without id parameter for singular types, because it's strange that findMany doesn't return "many" entries. But it's another discussion...
Related issue(s)/PR(s)
No response
The text was updated successfully, but these errors were encountered:
Link to the documentation page or resource
https://docs.strapi.io/dev-docs/api/entity-service/crud#findmany
Describe the bug
It was surprise for me that
await strapi.entityService.findMany('api::some-uid')
returns the object, but not an array for a singular types. And even docs says the return typeEntry[]
Suggested improvements or fixes
Would be great to describe an exclusion note like
For singular types "findMany" returns the entry data instead of array of entries
.Or even better to allow use
findOne
withoutid
parameter for singular types, because it's strange thatfindMany
doesn't return "many" entries. But it's another discussion...Related issue(s)/PR(s)
No response
The text was updated successfully, but these errors were encountered: