/** * Retrieves the contents of the specified $id * and assigns them into $object * * @param Morph_Object $object * @param mixed $id * @return Morph_Object */ public function fetchById(Morph_Object $object, $id) { $query = array('_id' => $id); $data = $this->Db->selectCollection($object->collection())->findOne($query); $object->__setData($data, Morph_Object::STATE_CLEAN); $object->storage($this); return $object; }