How to update record programmatically with ECK? I'm playing with Entity Construction Kit (ECK) on a Drupal 7 site. In a custom module I need to add, update and get ECK record.

By admin panel I created my entity "company" and his bundle "company". In my module I already built add and get method for the entity record (methods are working).

But  how can I update a specific record ?

Thanks.
After thousands of research, according to the page Creating and Modifying Entities this is the way to update an entity :

$entity = entity_load_single('entity_name', $entity_id);
$entity-&gt;title = 'new name';
$entity-&gt;save();


This will load the entity 'entity_name' with the id 'entity_id', then the title will be replace by 'new name'.

I hope its help.