make left joins really work
All checks were successful
soko-web/pipeline/pr-master This commit looks good

This commit is contained in:
Bence Pőcze 2023-05-01 16:16:57 +02:00
parent e9bfe4e4ad
commit 70a9e492e3
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

View File

@ -227,12 +227,16 @@ class PersistentDataManager implements IPersistentDataManager
next($data);
} else if (substr($key, 0, strlen($relation . '__')) === $relation . '__') {
if ($data[$relation . '__id'] !== null) {
$relationType = current($relations);
$relationModel = new $relationType();
$this->fillWithData($data, $relationModel, $withRelations, $relation);
$method = 'set' . str_replace('_', '', ucwords($relation, '_'));
$model->$method($relationModel);
} else {
next($data);
}
next($relations);
} else {