src/UnitOfWork.php
private function addIdentifiers(
        $newSerializedModel,
        array $dirtyFields,
        $idSerializedKey = null
    ): array {
        foreach ($newSerializedModel as $key => $value) {
            if ($idSerializedKey && isset($value[$idSerializedKey])) {
                $dirtyFields[$key][$idSerializedKey] = $value[$idSerializedKey];
            } elseif (is_string($value) && is_int($key)) {
                $dirtyFields[$key] = $value;
            }
        }

        return $dirtyFields;
    }
private function addIdentifiers(
        $newSerializedModel,
        array $dirtyFields,
        $idSerializedKey = null
    ): array {
        foreach ($newSerializedModel as $key => $value) {
            if ($idSerializedKey && isset($value[$idSerializedKey])) {
                $dirtyFields[$key][$idSerializedKey] = $value[$idSerializedKey];
            } elseif (is_string($value) && is_int($key)) {
                $dirtyFields[$key] = $value;
            }
        }

        return $dirtyFields;
    }
add defined identifiers to given model

@param ?mixed $idSerializedKey