public function save(Node $node)
    {
        $this->validateBinding();
        if (strlen(trim($node->getDn())) == 0) {
            throw new PersistenceException('Cannot save: dn missing for the entry');
        }

        if (! $node->isHydrated()) {
            try {
                $origin = $this->getNode($node->getDn());
                $node->rebaseDiff($origin);
            } catch(NodeNotFoundException $e) {
                $this->connection->addEntry($node->getDn(), $node->getRawAttributes());
                $node->snapshot();
                return true;
            }
        }

        if (count($data = $node->getDiffAdditions()) > 0) {
            $this->connection->addAttributeValues($node->getDn(), $data);
        }
        if (count($data = $node->getDiffDeletions()) > 0) {
            $this->connection->deleteAttributeValues($node->getDn(), $data);
        }
        if (count($data = $node->getDiffReplacements()) > 0) {
            $this->connection->replaceAttributeValues($node->getDn(), $data);
        }

        $node->snapshot();
        return false;
    }