If I try to filter a field in the existing table works, but a field generated by max () does not work, even renaming, display the error getBackend().
Examples:
observer
$collection->getSelect()->columns(array('last_order' =>
new Zend_Db_Expr ("(SELECT MAX(created_at) FROM " .
$collection->getTable('sales/order') . " WHERE customer_id = e.entity_id)")));
grid - _prepareCollection()
$this->getCollection()->addFieldToFilter('last_order', 1);
I was wondering how can I make this filter work with my select
columns()
, ajoin()
is the normal way to include data from other tables.