public function refresh()
    {
        $data = $this->collection
            ->getMongoCollection()
            ->findOne(array(
                '_id' => $this->getId()
            ));

        $this->replace($data);

        $this->operator->reset();

        return $this;
    }
public function refresh()
    {
        $data = $this->collection
            ->getMongoCollection()
            ->findOne(array(
                '_id' => $this->getId()
            ));

        $this->replace($data);

        $this->operator->reset();

        return $this;
    }
public function refresh ( ) { $ data = $ this -> collection -> getMongoCollection ( ) -> findOne ( array ( '_id' => $ this -> getId ( ) ) ) ; $ this -> replace ( $ data ) ; $ this -> operator -> reset ( ) ; return $ this ; }
Reload data from db and reset all unsaved data
Reload data from db and reset all unsaved data