当我尝试过滤不存在​​的字段

时间:2017-11-23 23:58:39

标签: mongodb rest loopbackjs

```的JavaScript F:\ APPS \ WPB \背部\ node_modules \ MongoDB的\ LIB \ utils.js:123     process.nextTick(function(){throw err;});                                   ^

TypeError:无法读取未定义的属性'toString'     at keyToString(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ lib \ include_utils.js:69:47)     at Object.set(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ lib \ include_utils.js:75:13)     at Object.buildOneToOneIdentityMapWithOrigKeys(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ lib \ include_utils.js:26:11)     在includeHasManySimple(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ lib \ include.js:594:36)     at processIncludeItem(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ lib \ include.js:366:16)     在F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ lib \ include.js:184:5     在F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ node_modules \ async \ dist \ async.js:3025:16     at eachOfArrayLike(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ node_modules \ async \ dist \ async.js:940:9)     at eachOf(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ node_modules \ async \ dist \ async.js:990:5)     在Object.eachLimit(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ node_modules \ async \ dist \ async.js:3089:3)     在Function.Inclusion.include(F:\ apps \ WPB \ back \ node_modules \ loopback-datasource-juggler \ lib \ include.js:183:9)     在F:\ apps \ WPB \ back \ node_modules \ loopback-connector-mongodb \ lib \ mongodb.js:908:35     在handleCallback(F:\ apps \ WPB \ back \ node_modules \ mongodb \ lib \ utils.js:120:56)     在F:\ apps \ WPB \ back \ node_modules \ mongodb \ lib \ cursor.js:860:16     在handleCallback(F:\ apps \ WPB \ back \ node_modules \ mongodb-core \ lib \ cursor.js:171:5)     at setCursorDeadAndNotified(F:\ apps \ WPB \ back \ node_modules \ mongodb-core \ lib \ cursor.js:505:3) ```

我正在使用带有GET方法/users/{id}

的环回REST API

参数: id:me(与我的accessToken的id相同) 过滤器:{"include":{"relation":"providers","scope":{"where":{"provider":"steam"},"fields":"providerId"}},"fields":"anythingThatDoesNotExist"}

这是查询网址:mydomain.com/users/me?filter=%7B%22include%22%3A%7B%22relation%22%3A%22providers%22%2C%22scope%22%3A%7B%22where%22%3A%7B%22provider%22%3A%22steam%22%7D%2C%22fields%22%3A%22providerId%22%7D%7D%2C%22fields%22%3A%22anythingThatDoesNotExist%22%7D&access_token=EFlnLANLgX9Uz6ilPKWa4sN73rKeE70oUean5hu3Zqkodp24oGN6BNyMSBwJLH3j

任何人都可以免费使用端点。如果任何用户查询错误,我的服务器就不会死。

我很感激你们的帮助:(

0 个答案:

没有答案