loopback-connector-mongodb icon indicating copy to clipboard operation
loopback-connector-mongodb copied to clipboard

v7.0.0-alpha.1 - MongoInvalidArgumentError: Argument "options" must not be function

Open lien-dkseo opened this issue 1 year ago • 1 comments

Steps to reproduce

const cursor = (await this.studyRepository.execute(
  'Study',
  'aggregate',
  [
    {
      $facet: {
        StudyCount: ...,
        SampleTypeCount: ...,
      },
    },
  ],
)) as AggregationCursor;

Current Behavior

MongoInvalidArgumentError: Argument "options" must not be function
    at Collection.aggregate (d:\dev\lien\samplebox-web-backend\node_modules\loopback-connector-mongodb\node_modules\mongodb\lib\collection.js:371:19)
    at d:\dev\lien\samplebox-web-backend\node_modules\loopback-connector-mongodb\lib\mongodb.js:602:38

Expected Behavior

working code in 6.2.0

Link to reproduction sandbox

Additional information

win32 x64 18.15.0

├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── [email protected]
├── [email protected]

Related Issues

See Reporting Issues for more tips on writing good issues

lien-dkseo avatar Apr 05 '23 06:04 lien-dkseo