SUPEE6788 and SQL statements in addFieldToFilter
-
13-12-2019 - |
Question
At SUPEE-6788 Technical Details the Magento people give examples about how to fix Magento modules. Anyway, I have some places I found after install the SUPEE6788 patch that isn't explained in examples maybe someone could help me with. I have this:
$collection->addFieldToFilter('`main_table`.order_id', array('in' => $ordersIds));
I'm just wondering how to fix it? Like this: ('main_table .order_id',array('in" =>$ordersIds))
i.e. just remove the " ` " ?
Thanks
Solution
Yes, you cannot use arbitrary SQL expressions anymore, but you can still use the form table_alias.field_name
, without backticks (``).
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange