5 Replies
If it's an aggregation like
count(*)
you can't use it in relational queries
You have to use the regular CRUD APII ran into same issue and using extras doesn’t work, I have to use the regular CRUD api
Count seems like a very common thing that people want. in the findMany query why not have a "with" option for relations? like
Just a thought on a future feature that could help out with the many "count" questions I'm seeing (since I'm looking for a nice way too)
here is how I get total count of the records returned. I also did some pagination here.