public function save(array $data = [])
    {
        Manager::getInstance()->get($this)->refreshRelations();
        $action = Save::INSERT;
        $pmk = $this->primaryKey;
        if ($this->$pmk || isset($data[$pmk])) {
            $action = Save::UPDATE;
        }

        if ($action == Save::UPDATE) {
            return $this->_update($data);
        }

        return $this->_insert($data);
    }