I've added a custom filed to the customer addresses, but I don't know how to query using this field.
I'm executing the following piece of code:
$collection = Mage::getModel('customer/address') ->getCollection() ->addAttributeToSelect('custom_field') ->addFieldToFilter('custom_field', '1'); echo var_dump($collection);
But I'm facing this error:
Fatal error: Call to a member function getBackend() on a non-object in app\code\core\Mage\Eav\Model\Entity\Abstract.php on line 816
My question is: how can I query through this field?
Thanks.