tblobaum / mongoose-troop

plugins for your mongoose schemas.
MIT License
242 stars 29 forks source link

Mongoose 3 doesn't accept arrays for query selects. #19

Closed wdulin closed 12 years ago

wdulin commented 12 years ago

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.