Compare commits

..

2 Commits

Author SHA1 Message Date
8a1820275d
Merge pull request 'iterate in $data until fields for empty relation are over' (#22) from bugfix/fix-model-loading-when-left-join-is-empty into master
All checks were successful
soko-web/pipeline/head This commit looks good
Reviewed-on: #22
2023-05-28 15:48:31 +02:00
da2801560d
iterate in $data until fields for empty relation are over
All checks were successful
soko-web/pipeline/pr-master This commit looks good
2023-05-28 15:47:35 +02:00

View File

@ -278,7 +278,10 @@ class PersistentDataManager implements IPersistentDataManager
$method = 'set' . str_replace('_', '', ucwords($relation, '_'));
$model->$method($relationModel);
} else {
next($data);
while (substr($key, 0, strlen($relation . '__')) === $relation . '__') {
next($data);
$key = key($data);
}
}
next($relations);