I have this filter
{"where":
{"and": [
{"idCliente": "${cliente}"},
... // more filters
]
}
,
"include": [
{
"relation": "Articulos", <---hasMany
"relation": "vendedor" <---belongto
}
],"order":["fecha DESC"]
}
but the response only get belongTo relations but omit hasMany relation
if i include only one in filter, not both, working fine
@fgvicente please share a minimal app reproducing the behavior, we can take a look at the issue.
If you want to query more than one relation, you have to use the following syntax:
"include": [{"relation": "Articulos"}, {"relation": "vendedor"}]
the schema with relation is like this
'{
"include":[
{
"relation":"insured",
"scope":{
"where":{
"insured_city":"Carora"
}
}
}
]
}'
@nabdelgadir thanks!! now works