/**
  * Adds a new translation to the stash. If the same key already exists, the
  * previous translation and metadata will be replaced with the new one.
  */
 public function addTranslation(StashedTranslation $item)
 {
     $row = array('ts_user' => $item->getUser()->getId(), 'ts_title' => $item->getTitle()->getDBKey(), 'ts_namespace' => $item->getTitle()->getNamespace(), 'ts_value' => $item->getValue(), 'ts_metadata' => serialize($item->getMetadata()));
     $indexes = array(array('ts_user', 'ts_namespace', 'ts_title'));
     $this->db->replace($this->dbTable, $indexes, $row, __METHOD__);
 }