This commit is contained in:
Maxime Renou
2019-03-19 14:27:57 +01:00
parent 85f081f286
commit 830dff92a2

View File

@@ -44,7 +44,10 @@ class Storage
protected function getStorageAnnotation($entity, $attribute) protected function getStorageAnnotation($entity, $attribute)
{ {
$reflection = new \ReflectionProperty($entity, $attribute); $reflectionEntity = new \ReflectionObject($entity);
$reflection = $reflectionEntity->getProperty($attribute);
$reflection->setAccessible(true);
$reader = new AnnotationReader(); $reader = new AnnotationReader();
$annotations = $reader->getPropertyAnnotations($reflection); $annotations = $reader->getPropertyAnnotations($reflection);