elseif ($command instanceof DeleteCommand
) { $operation = EntityWriteResult::OPERATION_DELETE;
} $payload =
$this->
getCommandPayload($command);
$writeResults[$uniqueId] =
new EntityWriteResult( $primaryKey,
$payload,
$command->
getDefinition()->
getEntityName(),
$operation,
$command->
getEntityExistence(),
$command instanceof ChangeSetAware ?
$command->
getChangeSet() : null
);
} /*
* Updates for entities with attributes are split into two commands: an UpdateCommand and a JsonUpdateCommand.
* We need to merge the payloads here.
*/
foreach ($jsonUpdateCommands as $uniqueId =>
$command) { $payload =
[];
if (isset($writeResults[$uniqueId])) { $payload =
$writeResults[$uniqueId]->
getPayload();
}