From 2bd2cc71e580a4b7c832841f634de98287cb3c9a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 7 Jan 2026 14:06:18 +0100 Subject: [PATCH] fix(snowflake): Allow SnowflakeAware to overwrite the field types Signed-off-by: Joas Schilling --- lib/public/AppFramework/Db/Entity.php | 2 +- lib/public/AppFramework/Db/SnowflakeAwareEntity.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php index 910b2850d3632..f29eef92b2854 100644 --- a/lib/public/AppFramework/Db/Entity.php +++ b/lib/public/AppFramework/Db/Entity.php @@ -22,7 +22,7 @@ abstract class Entity { public int|string|null $id = null; private array $_updatedFields = []; /** @psalm-param $_fieldTypes array */ - private array $_fieldTypes = ['id' => 'integer']; + protected array $_fieldTypes = ['id' => 'integer']; /** * Simple alternative constructor for building entities from a request diff --git a/lib/public/AppFramework/Db/SnowflakeAwareEntity.php b/lib/public/AppFramework/Db/SnowflakeAwareEntity.php index 987ebb2e54560..bdcbf12135b4a 100644 --- a/lib/public/AppFramework/Db/SnowflakeAwareEntity.php +++ b/lib/public/AppFramework/Db/SnowflakeAwareEntity.php @@ -24,7 +24,7 @@ abstract class SnowflakeAwareEntity extends Entity { protected ?Snowflake $snowflake = null; /** @psalm-param $_fieldTypes array */ - private array $_fieldTypes = ['id' => Types::STRING]; + protected array $_fieldTypes = ['id' => Types::STRING]; public function setId($id): void { throw new \LogicException('Use generated id to set a new id to the Snowflake aware entity.');