$prefix =
strtolower($info['entity'
]);
$groups[$prefix][] =
$info;
if ($info['field'
] === 'id'
) { $primaryIdentifiers[$prefix] =
$info['value'
];
} } $columnInfo =
$this->dqlHelper->
getColumnsForProductListing();
// Loop through all entities, get corresponding models and set the values
foreach ($groups as $prefix =>
$fields) { $entity =
$this->dqlHelper->
getEntityForPrefix($prefix);
// All models except price
if ($entity !== Price::
class) { $model =
$entityManager->
find($entity,
$primaryIdentifiers[$prefix]);
if ($model === null
) { continue;
} foreach ($fields as $field) { // Do not persist non-editable fields
$fieldInfo =
$columnInfo[ucfirst($prefix) .
ucfirst($field['field'
])];