We're using the FAQ pro plugin and try to filter based on productStreams.name like this:
{
"filter": [
{
"type": "contains",
"field": "productStreams.name",
"value": "Dynamic product group name"
}
]
}
However, I receive this error:
Accessor acris_faq_group.productStreams.name is not allowed in this api scope
The relationship is ApiAware and can be accessed by both API's:
(new ManyToManyAssociationField('productStreams', ProductStreamDefinition::class, FaqGroupProductStreamDefinition::class, 'faq_group_id', 'product_stream_id'))->addFlags(new ApiAware()),
However, the productStreams.name
field is not accessible by both API's, even though it should be according to the ProductStreamDefinition:
return new FieldCollection([
(new IdField('id', 'id'))->addFlags(new PrimaryKey(), new Required()),
(new JsonField('api_filter', 'apiFilter'))->addFlags(new WriteProtected()),
(new BoolField('invalid', 'invalid'))->addFlags(new WriteProtected()),
(new TranslatedField('name'))->addFlags(new ApiAware(), new SearchRanking(SearchRanking::HIGH_SEARCH_RANKING)),
(new TranslatedField('description'))->addFlags(new ApiAware()),
(new TranslatedField('customFields'))->addFlags(new ApiAware()),
(new TranslationsAssociationField(ProductStreamTranslationDefinition::class, 'product_stream_id'))->addFlags(new Required()),
(new OneToManyAssociationField('filters', ProductStreamFilterDefinition::class, 'product_stream_id'))->addFlags(new CascadeDelete()),
new OneToManyAssociationField('productCrossSellings', ProductCrossSellingDefinition::class, 'product_stream_id'),
new OneToManyAssociationField('productExports', ProductExportDefinition::class, 'product_stream_id', 'id'),
new OneToManyAssociationField('categories', CategoryDefinition::class, 'product_stream_id'),
]);
According to the configuration of the entities I would expect to be able to filter on the product stream name