0

I'm trying to get a subset of underlying mongodb collection that fits in particular datetime range. So here is a code:

io.socket.get('/myResource', {
    sort: 'myDatetimeField',
    where: {
        myDatetimeField: {
            '>': '2015-01-01T00:00:00.000Z',
            '<': '2015-02-01T00:00:00.000Z'
        }
    }
}, function() { ... });

And the result is:

MongoError: Can't canonicalize query: BadValue Can't have RegEx as arg to predicate over field 'myDatetimeField'

Did i miss something or there is an issue?

P.S. Using sails 0.11.0 with mongo 2.6.8.

Radagast
  • 5,798
  • 3
  • 22
  • 18

1 Answers1

0

It really seems to be an issue (https://github.com/balderdashy/sails-mongo/issues/177), and it has already been fixed in master branch.

Radagast
  • 5,798
  • 3
  • 22
  • 18