function _applyCustomWhere(doc, where) {
  if (doc.$where == null) {
    return;
  }
  for (const key of Object.keys(doc.$where)) {
    where[key] = doc.$where[key];
  }
}
Compiled middleware for this model. Set in `applyHooks()`.

@api private
@property _middleware
@memberOf Model
@static