Skip to content

Commit 10030d1

Browse files
committed
filtered basemodel already loaded array
1 parent 10c2363 commit 10030d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/base/abstracts/Models/BaseModel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ public static function loadMultiple(ContainerInterface $container, array $ids, b
528528
});
529529
}
530530

531+
$already_loaded = array_filter($already_loaded);
532+
531533
$out = (!empty($ids) ? static::loadMultipleByCondition($container, ['id' => $ids], $reset) : []) +
532534
(!empty($already_loaded) ? array_intersect_key(static::$loadedObjects[static::defaultTableName()], array_flip($already_loaded)) : []);
533535

0 commit comments

Comments
 (0)