Franco Fiori
04/29/2025, 5:26 PM{
"name": "priceLists",
"fields": [
{"name": "id", "type": "string"},
{"name": "name", "type": "string"},
{"name": "enabled", "type": "bool"}
]
}
{
"name": "products",
"fields": [
{"name": "id", "type": "string"},
{"name": "name", "type": "string"}
]
}
{
"name": "priceList_products_access",
"fields": [
{"name": "priceList_id", "type": "string", "reference": "priceLists.id"},
{"name": "product_id", "type": "string", "reference": "products.id"},
]
}
In the following query:
{
"q": "*",
"collection": "products",
"query_by": "name",
"filter_by": "$priceList_products_access(priceList_id 1)",
"include_fields": "$priceLists(*)"
}
I want to add a enabled=true filter for the priceList schema.
Ideally it want the products that have the enabled pricelist. Any ideas?