1

I get a syntax on a simple NeDB request. What is wrong with my query written for Feathers/NeDB?

var workFilter = {
         query: {
                _id: { $nin: workIds}
         },
         { customerId: 1, productId: 1, _id: 1}
}

Thank you

Moshe Shmukler
  • 1,270
  • 2
  • 21
  • 43
  • Basically, your `JSON` is invalid. Doesn't maintain a `key value` for the `projection` part of the filter. – BatScream Dec 13 '15 at 07:42

1 Answers1

0

You can do it like this:

datastore
.find({_id:{$nin:workIds}})
.projection({customerId:1, productId:1})
.exec(callback);

The _id property will always be included.

Rudi
  • 2,987
  • 1
  • 12
  • 18