How could we implement “in” query in custom controller? I need to select records based on set of ids from a collection. Using MongoDB as backend.
Your inputs highly appreciated.
Kind Regards,
Basu
How could we implement “in” query in custom controller? I need to select records based on set of ids from a collection. Using MongoDB as backend.
Your inputs highly appreciated.
Kind Regards,
Basu
You should be able to do this in a controller using the service strapi.services.somemodel.find({ in: [1,2,3] })
(given I’m using SQL ids here, but you should be able to swap this out for mongo ObjectIDs)