Aggregate.prototype.option()

Parameters
Returns:
  • «Aggregate» this

Lets you set arbitrary options, for middleware or plugins.

Example:

  1. const agg = Model.aggregate(..).option({ allowDiskUse: true }); // Set the `allowDiskUse` option
  2. agg.options; // `{ allowDiskUse: true }`