public function setRelationship($name, $config = array())
    {
        $relationships = is_string($name) ? array($name => $config) : $name;
        settype($relationships, 'array');
        $property = null;

        foreach ($relationships as $name => $config) {
            if (is_numeric($name)) {
                $name = $config;
                $config = array();
            }

            $config['name'] = pick($this->getAlias($name), $name);
            $config['description'] = $this;
            $property = AnDomainProperty::setRelationship(new AnConfig($config));

            if ($property instanceof AnDomainRelationshipOnetomany) {
                //if the entity is abstract then
                //keep track of all the has relationships
                //this relationship will propgate through children
                if ($this->isAbstract()) {
                    self::$__has_relationships[$property->getName()][$this->_entity_identifier->classname] = $property;
                }
            }
        }

        return $property;
    }