metadata record id length

This commit is contained in:
Yuri Kuznetsov
2023-02-04 09:36:11 +02:00
parent dcbd2bfa42
commit 4b5787c0d0
3 changed files with 10 additions and 1 deletions
@@ -90,9 +90,11 @@ class Converter
/** @var array<string, mixed> */
private $idParams = [
'dbType' => Types::STRING,
'len' => 24, // @todo Make configurable.
'len' => self::DEFAULT_ID_LENGTH,
];
private const DEFAULT_ID_LENGTH = 24;
/**
* Permitted entityDefs parameters which will be copied to ormMetadata.
*
@@ -116,6 +118,9 @@ class Converter
$platform = $configDataProvider->getPlatform();
$this->indexHelper = $indexHelperFactory->create($platform);
$this->idParams['len'] = $this->metadata->get(['app', 'recordId', 'length']) ??
self::DEFAULT_ID_LENGTH;
}
/**
@@ -32,6 +32,7 @@
["app", "hook"],
["app", "api"],
["app", "databasePlatforms"],
["app", "recordId"],
["selectDefs"],
["recordDefs"],
["pdfDefs"],
@@ -0,0 +1,3 @@
{
"length": 24
}