function _setIsNew(doc, val) {
  doc.$isNew = val;
  doc.$emit('isNew', val);
  doc.constructor.emit('isNew', val);

  const subdocs = doc.$getAllSubdocs({ useCache: true });
  for (const subdoc of subdocs) {
    subdoc.$isNew = val;
    subdoc.$emit('isNew', val);
  }
}
ignore

@param {Array} arr
@param {Object} options
@param {Function} callback
@api private
@memberOf Model
@method $__insertMany
@static