public function setManyToManyRelation($rel)
    {
        $key = $rel['refTable']->getModelName();
        $this->_m2mRelations[$key] = $rel;
        $this->getDocument()->addLog(sprintf('Applying N <=> N relation "%s" for "%s <=> %s"', $rel['refTable']->getParameters()->get('name'), $this->getModelName(), $key));

        return $this;
    }