I have the following user API from Strapi cms to which I want to deep fetch address component(repeatable component).
So, what I want to fetch is the user whose address is 63 Southlands Road... I tried so many ways:
- tried the Strapi built-in query
http://localhost:1337/users?address.info=63%20Southlands%20Road
tried the custom query:
const result = await strapi .query("user") .model.query((qb) => { qb.where("address.info", "63 Southlands Road"); }) .fetch();
All these above messages didn't work out and I run out of options. Is this possible in Strapi... if not I am trying to switch to node server.

In
Strapithere's no way of querying the models based on the nested component data directly. But you can use a raw query instead to query the component data and get the desired result. The table names are based on the model name in context, asStrapifollows this particular naming convention and automatically creates the tables when you create thecontent-typesin admin.Naming convention followed by
StrapiIf you create a model called
userand create two components in it for example,addressandlocationthenStrapiwill create 4 tables as follows:addresscomponents linked to theusermodellocationcomponents linked to theusermodelYou can cross check the table names by opening up your project database via
pg-adminorphp-myadmin.Solution
P.S: I've only tried this in
MySQLandPostGreSQL