Hi
We have grid with parent products and I need to filter by to field of a repetable of the product model. I try to achieve something like this? We can have multiple product_models, and more filters for this children. This is my temp query and It doesn’t have results if i filter the market in the product_model, i have result if I filter the product directly in the parent. But we don’t need filter the market in the parent.
getTodayDate() returns the date from today (ej: 2023-07-13). Is i say it works in the parent but not in the model.
let query = qs.stringify({
filters: {
$and :[{
isParent: {
$eq: true,
}
},{
product_models: {
markets: {
countryCode: {
$contains: 'US',
},
releaseDate: {
$lte: getTodayDate(),
}
}
}
}]
},
populate: ['image'],
sort: [this.orderBy],
locale: 'en-GB'
}, {
encodeValuesOnly: true, // prettify url
});
System Information
- Strapi Version: 4.9
- Operating System: Linux
- Database: MySQL 8
- Node Version: 16.17.1
- NPM Version: 9.2.0
- Yarn Version: