I would like to update a customer without actually loading the entire customer model. Here is my current code:
$customer = Mage::getModel('customer/customer')->load($customerId, 'entity_id');
$customer->setEmail('test@email.com');
$customer->save();
Is it possible to update the model without first loading it?
The code bellow should work fine as long as the model’s ID is defined, it will however loose the previous data the object had.
INSERT
UPDATE with hydration
UPDATE without hydration
UPDATE single attribute
The principle is the fact that you can set an attribute value by specifying the entity_id, attribute_code/attribute_id and the value.
This obviously does not have the aforementioned negative side-effect.