Skip to content

Commit 94d29e9

Browse files
committed
We must not ignore simple attributes in additional
We also have hybrid attributes (like select) which are both, ISimple and IComplex. We might also have all other kinds of combinations. Therefore we now have the sequence of: - Always fetch simple attributes - Then try translated - Finally try complex
1 parent 0eeb9fa commit 94d29e9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/MetaModels/DataAccess/ItemRetriever.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,9 @@ private function fetchRows(array $ids)
208208
*/
209209
private function fetchAdditionalAttributes(array $ids, array $result)
210210
{
211-
$attributeNames = array_diff(array_keys($this->attributes), array_keys($this->simpleAttributes));
212-
$attributes = array_filter($this->attributes, function ($attribute) use ($attributeNames) {
211+
$attributes = array_filter($this->attributes, function ($attribute) {
213212
/** @var IAttribute $attribute */
214-
return in_array($attribute->getColName(), $attributeNames);
213+
return $attribute instanceof ITranslated || $attribute instanceof IComplex;
215214
});
216215

217216
foreach ($attributes as $attributeName => $attribute) {

0 commit comments

Comments
 (0)