Suppose I have model with field of type ‘set’ with contentlinks and each content link has multiple entries as highlighted below.
"target": [
{
"A": [
{
"_model": "Type-A",
"_id": "e34891a266653524790000b5"
}
],
"B": [
{
"_model": "Type-B",
"_id": "b34891a278953524791111c9"
}
],
}
],
How do I make a custom query? I am using
$options=array(
'filter' => [
'target.A._id' =>$targetID,
], "populate"=> 1);
However, query does not return any entries. Instead, following syntax works which is of no use since I cannot fix the index.
$options=array(
'filter' => [
'target.A.0._id' =>$targetID,
], "populate"=> 1);
Could anyone suggest something?