mirror of
https://github.com/nextcloud/server.git
synced 2026-04-28 01:28:08 -04:00
fix(snowflake): Allow SnowflakeAware to overwrite the field types
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
40b79f5af8
commit
2bd2cc71e5
2 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ abstract class Entity {
|
|||
public int|string|null $id = null;
|
||||
private array $_updatedFields = [];
|
||||
/** @psalm-param $_fieldTypes array<string, Types::*> */
|
||||
private array $_fieldTypes = ['id' => 'integer'];
|
||||
protected array $_fieldTypes = ['id' => 'integer'];
|
||||
|
||||
/**
|
||||
* Simple alternative constructor for building entities from a request
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ abstract class SnowflakeAwareEntity extends Entity {
|
|||
protected ?Snowflake $snowflake = null;
|
||||
|
||||
/** @psalm-param $_fieldTypes array<string, Types::*> */
|
||||
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.');
|
||||
|
|
|
|||
Loading…
Reference in a new issue