Upsert save entity - insert or update on duplicate key. Intended to be
used in conjunction with fields that are marked 'unique'
public function hookUpdateSearchIndex(\Spot\Mapper $mapper) { $result = $mapper->upsert('Entity_Event_Search', array('event_id' => $this->id, 'body' => $this->title . ' ' . $this->description), array('event_id' => $this->id)); }