From 0fd6889c6f7553b51d868509cc56086c0eda6935 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Mon, 3 Feb 2025 19:56:35 +0000 Subject: [PATCH] - ID attribute is now readonly by default (since autoincremented) --- src/Attribute/Property/Field/Id.php | 2 +- src/Common/EntityResolver.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Attribute/Property/Field/Id.php b/src/Attribute/Property/Field/Id.php index 7ab5bdd..e0b687c 100644 --- a/src/Attribute/Property/Field/Id.php +++ b/src/Attribute/Property/Field/Id.php @@ -16,6 +16,6 @@ class Id extends \Ulmus\Attribute\Property\Field { ], public bool $nullable = false, public mixed $default = null, - public bool $readonly = false, + public bool $readonly = true, ) {} } diff --git a/src/Common/EntityResolver.php b/src/Common/EntityResolver.php index 91cf874..f61a7b6 100644 --- a/src/Common/EntityResolver.php +++ b/src/Common/EntityResolver.php @@ -72,7 +72,6 @@ class EntityResolver { $key = strtolower($item->name); break; - case static::KEY_ENTITY_NAME: $key = $item->name; break;