query-engine
query-engine copied to clipboard
Error 'Couldn't find the selector' when changing properties order in findAllLive
I'm using docpad 6.59 and node 0.10.12
If I define this collection
pages: (database) ->
database.findAllLive({relativeOutDirPath:/de[\/\\]\w+/, pageOrder: $exists: true})
it works, but when I change the order, it fails:
pages: (database) ->
database.findAllLive({pageOrder: $exists: true, relativeOutDirPath:/de[\/\\]\w+/})
Error:
error: An error occured:
Error: Couldn't find the selector relativeOutDirPath
at Query.compileSelector (./node_modules/docpad/node_modules/query-engine/out/lib/query-engine.js:1492:15)
I just got this error while trying to manipulate the query object as well.
Though you might try:
pages: (database) ->
database.findAllLive({pageOrder: { $exists: true }, relativeOutDirPath:/de[\/\\]\w+/})
The Coffeescript shorthand might be messing things up.