public function getAttributeValue($document, $attribute)
    {
        if ($document instanceof Proxy && !in_array($attribute, $this->getIdentifierAttributeNames()) && !$document->__isInitialized()) {
            $document->__load();
        }

        return $this->getPropertyMetadata($attribute)->getValue($document);
    }