DbObjectStore: load by ID for int keys

This commit is contained in:
Thomas Gelf 2021-08-25 12:14:22 +02:00
parent 430f54837b
commit 8a280619ad

View File

@ -67,7 +67,11 @@ class DbObjectStore
}
$modification = null;
try {
$object = $class::load($key, $this->connection);
if (is_int($key)) {
$object = $class::loadWithAutoIncId($key, $this->connection);
} else {
$object = $class::load($key, $this->connection);
}
if ($branchStore && $modification = $branchStore->eventuallyLoadModification(
$object->get('id'),
$this->branch->getUuid()