public function getRelation($key)
    {
        $relation = new AVRelation($this, $key);
        if (isset($this->estimatedData[$key]))
        {
            $object = $this->estimatedData[$key];
            if ($object instanceof AVRelation)
            {
                $relation->setTargetClass($object->getTargetClass());
            }
        }

        return $relation;
    }