tblobaum/mongoose-troop

Mongoose 3 doesn't accept arrays for query selects.

Closed this issue · 0 comments

When using Mongoose 3 alpha, the pagination plugin causes the following error:

TypeError: Invalid select() argument. Must be a string or object.

Turns out that support for arrays of fields has been removed from the Mongoose query select. The default for the fields select in mongoose-troop is [] and therefore triggers the error.