フィールド「カテゴリ」に特定の「id」を持つ少なくとも 1 つのリンクがあるタイプ「ストア」のすべてのエントリを照会したいのですが、どうすればこれを達成できますか?
私はそれを試しました:
$query = new \Contentful\Delivery\Query;
$query->setContentType('store')->where('fields.category.pt-BR', $id );
$page = $client->getEntries($query);
「ストア」内のリンクの構造は次のとおりです。
["categories"]=>
object(stdClass)#49 (1) {
["pt-BR"]=>
array(1) {
[0]=>
object(stdClass)#52 (1) {
["sys"]=>
object(stdClass)#55 (3) {
["type"]=>
string(4) "Link"
["linkType"]=>
string(5) "Entry"
["id"]=>
string(22) "5LuXxFE2eQoqOY0yQO2iQ4"
}
}
}
}
そして、「カテゴリ」自体は次のようになります。
["category"]=>
object(stdClass)#49 (1) {
["pt-BR"]=>
array(1) {
[0]=>
object(stdClass)#46 (1) {
["sys"]=>
object(stdClass)#47 (3) {
["type"]=>
string(4) "Link"
["linkType"]=>
string(5) "Entry"
["id"]=>
string(22) "5LuXxFE2eQoqOY0yQO2iQ4"
}
}
}
}
しかし、うまくいきませんでした。