I have defined my own entity: 'game'; created some 'games' with
entity_create; and loaded one of these 'games' into a form for editing. Now, I want to update the entity with my submit handler. Here is the relevant code inside the handler:
$game = entity_load_single('game', $form_state['values']['game_id']); $wrapper = entity_metadata_wrapper('game', $game); $wrapper->some_property->set($form_state['values']['some_value']); $wrapper->save();
EntityMetadataWrapperException: Entity property some_property doesn't support writing. in EntityStructureWrapper->setProperty() (line 493 of /.../sites/all/modules/contrib/entity/includes/entity.wrapper.inc).
I was looking for a function like
entity_update, but it doesn't seem to exist. How can I update my 'game' entities? Thanks.