mirror of
https://github.com/danog/AsyncOrm.git
synced 2024-12-02 09:38:31 +01:00
Cleanup
This commit is contained in:
parent
82e1e52f09
commit
51b6a519ca
@ -36,7 +36,7 @@ trait DbAutoProperties
|
|||||||
/**
|
/**
|
||||||
* Initialize database properties.
|
* Initialize database properties.
|
||||||
*/
|
*/
|
||||||
public function initDbProperties(FieldConfig $config): void
|
public function initDbProperties(Settings $settings, string $tablePrefix): void
|
||||||
{
|
{
|
||||||
$this->properties = [];
|
$this->properties = [];
|
||||||
$promises = [];
|
$promises = [];
|
||||||
@ -47,7 +47,6 @@ trait DbAutoProperties
|
|||||||
}
|
}
|
||||||
$attr = $attr[0]->newInstance();
|
$attr = $attr[0]->newInstance();
|
||||||
|
|
||||||
$settings = $config->settings;
|
|
||||||
if ($settings instanceof DriverSettings) {
|
if ($settings instanceof DriverSettings) {
|
||||||
$ttl = $attr->cacheTtl ?? $settings->cacheTtl;
|
$ttl = $attr->cacheTtl ?? $settings->cacheTtl;
|
||||||
if ($ttl !== $settings->cacheTtl) {
|
if ($ttl !== $settings->cacheTtl) {
|
||||||
@ -69,7 +68,7 @@ trait DbAutoProperties
|
|||||||
}
|
}
|
||||||
|
|
||||||
$config = new FieldConfig(
|
$config = new FieldConfig(
|
||||||
$config->table.'_'.($attr->tablePostfix ?? $property->getName()),
|
$tablePrefix.($attr->tablePostfix ?? $property->getName()),
|
||||||
$settings,
|
$settings,
|
||||||
$attr->keyType,
|
$attr->keyType,
|
||||||
$attr->valueType,
|
$attr->valueType,
|
||||||
|
Loading…
Reference in New Issue
Block a user