public function getProperty($name = null)
    {
        if (is_null($name)) {
            return $this->_properties;
        }

        $name = pick($this->getAlias($name), $name);
        $property = null;

        if (isset($this->_properties[$name])) {
            $property = $this->_properties[$name];
        } elseif (isset(self::$__has_relationships[$name])) {
            //check if any of the classes are the parent class
            //if yes, then the relationship also propegates to the
            //children
            $classes = self::$__has_relationships[$name];
            foreach ($classes as $class => $instance) {
                if (is_subclass_of($this->_entity_identifier->classname, $class)) {
                    //clone the property
                    $property = clone $instance;
                    $this->_properties[$name] = $property;
                    break;
                }
            }
        }

        return $property;
    }