Tried filtering with option_id
and value_id
but it is looking for value and when I change it to catalog_product_entity_int.value_id
or at_manufacturer.value_id
it returns syntax error.
Trying to filter with code
$productcollection = $this->collectionFactory->create()->addAttributeToSelect('manufacturer')->addFieldToFilter('something here',['eq'=>'value id or option_id here']);
https://i.stack.imgur.com/A6C7O.png
query looks like that when debugging
SELECT `e`.*, `at_manufacturer`.`value` AS `manufacturer` FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_product_entity_int` AS `at_manufacturer` ON (`at_manufacturer`.`entity_id` = `e`.`entity_id`) AND (`at_manufacturer`.`attribute_id` = '81') AND (`at_manufacturer`.`store_id` = 0) WHERE (at_manufacturer.value = 'LG')
How to filter that properly?