I followed this article: http://inchoo.net/magento/creating-an-eav-based-models-in-magento/
I created the Inchoo Blog module, after the firt time it ran the controller code the situation on the database is the following:
------------------------------------------------------------------------------
value_id | entity_type_id | attribute_id | store_id | entity_id | value
1 | 10 | 142 | 0 | 1 | Test title
2 | 10 | 143 | 0 | 1 | Zoran
------------------------------------------------------------------------------
Then I changed the controller, in this way:
<?php
class Inchoo_Blog_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$post = Mage::getModel('inchoo_blog/post')->load(1);
$post->setTitle('Test title2');
$post->setAuthor('Zoran Šalamun2');
$post->save();
}
}
?>
I wanted to change the values in the database, but the result was as follows:
How should I do if I want to update those values and not add more?