Closed pablodenadai closed 11 years ago
fixed in v0.6.2 Sorry about that, the populate is a hack. In some version of mongoose it started throwing exceptions if you tried to populate a non referenced field. This was very annoying because then you needed to know weather a field was a ref or not, to determine weather to populate it. This version fixes the issue you found with arrays.
Thank you so much for reporting!
var Player = new Schema({ name: { type: String, required: true }, });
var Match = new Schema({ players: [{ type: ObjectId, ref: 'Player' }], });
http://localhost:3000/rest/match/?populate=players