public function set($key, $value)
    {
        if ($key === self::ENTRY_EDGE_DEFINITIONS) {
            if ($this->_doValidate) {
                ValueValidator::validate($value);
            }

            $edgeDefinitionBaseObject = new EdgeDefinition();

            foreach ($value as $ed) {
                $edgeDefinition = clone $edgeDefinitionBaseObject;

                foreach ($ed[self::ENTRY_FROM] as $from) {
                    $edgeDefinition->addFromCollection($from);
                }
                foreach ($ed[self::ENTRY_TO] as $to) {
                    $edgeDefinition->addToCollection($to);
                }
                $edgeDefinition->setRelation($ed[self::ENTRY_COLLECTION]);
                $this->addEdgeDefinition($edgeDefinition);
            }
        } else if ($key === self::ENTRY_ORPHAN_COLLECTIONS) {
            if ($this->_doValidate) {
                ValueValidator::validate($value);
            }

            foreach ($value as $o) {
                $this->addOrphanCollection($o);
            }
        } else {
            parent::set($key, $value);
        }
    }