简体   繁体   中英

Why feathersjs mongoose service return different “total” in get() method?

I have simple mongoose service in my feathersjs app. In my laptop (mongo 3.6.6) I make query to app and receive correct data:

在此处输入图片说明

in data I have 4 rows and total=4. It good. But if I make same query to my app on server (mongo 4) I receive different respond:

在此处输入图片说明

I have 4 docs in data, it's valid, but 595 in "total", this invalid

I think I must have 4 in total

I have following dependencies in my feathers app:

 "dependencies": {
"@feathersjs/authentication": "^2.1.6",
"@feathersjs/authentication-jwt": "^2.0.1",
"@feathersjs/authentication-local": "^1.2.1",
"@feathersjs/configuration": "^1.0.2",
"@feathersjs/errors": "^3.3.0",
"@feathersjs/express": "^1.2.2",
"@feathersjs/feathers": "^3.1.5",
"compression": "^1.7.2",
"cors": "^2.8.4",
"feathers-mongodb": "^3.1.0",
"feathers-mongoose": "^6.1.1",
"helmet": "^3.12.0",
"mongodb": "^3.1.0-beta4",
"mongoose": "^5.0.18",
"serve-favicon": "^2.5.0",
"winston": "^2.4.2"

},

I found solution. I updated feathers-mongoose package from 6.1.1 to 6.1.4 and now all working good!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM