Code Monkey home page Code Monkey logo

loopback-mongo-aggregate-mixin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

loopback-mongo-aggregate-mixin's Issues

lookup documentation?

When i use loopback explorer and put this in the filter

{"aggregate": {"lookup": {"from": "UserAccount", "localField": "userId", "foreign": "_id", "as": "userAccount"}}}

an error occurs

TypeError: Cannot read property 'map' of undefined
at C:\development\wms\api\node_modules\loopback-mongo-aggregate-mixin\dist\aggregate.js:54:32
at handleCallback (C:\development\wms\api\node_modules\mongodb\lib\utils.js:96:12)
at C:\development\wms\api\node_modules\mongodb\lib\cursor.js:836:22
at handleCallback (C:\development\wms\api\node_modules\mongodb-core\lib\cursor.js:159:5)
at C:\development\wms\api\node_modules\mongodb-core\lib\cursor.js:577:22
at queryCallback (C:\development\wms\api\node_modules\mongodb-core\lib\cursor.js:200:16)
at Callbacks.emit (C:\development\wms\api\node_modules\mongodb-core\lib\topologies\server.js:119:3)
at Connection.messageHandler (C:\development\wms\api\node_modules\mongodb-core\lib\topologies\server.js:397:23)
at Socket. (C:\development\wms\api\node_modules\mongodb-core\lib\connection\connection.js:302:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:548:20)

How to correctly use lookup in aggregate?

How to use in filter?

Hi, I have putted below code on filter of explorer but it always show all object
{ "aggregate": { "group": { "id": "$isCompleted", "count": { "$sum": 1 } } } }
It seem to I have wrong in structure or something like that.
I want to count all object that have field "isCompleted", so do you have any hints?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.