diff --git a/src/Annotation/Generated.php b/src/Annotation/Generated.php index d663d215..c27bc013 100644 --- a/src/Annotation/Generated.php +++ b/src/Annotation/Generated.php @@ -23,7 +23,7 @@ public function __construct( ) { } - public function getType(): ?int + public function getFlags(): ?int { if (!$this->beforeInsert && !$this->onInsert && !$this->beforeUpdate) { return null; diff --git a/src/Configurator.php b/src/Configurator.php index f22e5381..ea30c586 100644 --- a/src/Configurator.php +++ b/src/Configurator.php @@ -308,7 +308,7 @@ public function initGeneratedFields(EntitySchema $entity, \ReflectionClass $clas try { $generated = $this->reader->firstPropertyMetadata($property, Generated::class); if ($generated !== null) { - $entity->getFields()->get($property->getName())->setGenerated($generated->getType()); + $entity->getFields()->get($property->getName())->setGenerated($generated->getFlags()); } } catch (\Throwable $e) { throw new AnnotationException($e->getMessage(), (int) $e->getCode(), $e);