We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! When I'm trying to deselect '_id' field in populate (when it is array of refs), then I always get empty array.
new mongoose.Schema( { geo: {type: [Number], index: '2d'}, photos: [ { type: Schema.Types.ObjectId, ref: 'Photo' } ] }, { strict: true } )
SomeCollection.find({geo: { "$within": {"$box": box} }}).populate('photos', {_id: 0}).select('-_id photos').exec(function (err, docs) { console.dir(docs); // get here: [ { photos: [] }, { photos: [] }, { photos: [] } ] });
If I don't deselect '_id', than all is ok: photos array for each doc is not empty
The text was updated successfully, but these errors were encountered:
Thanks for the detailed report. I'm looking into it now.
On Mon, Feb 4, 2013 at 8:27 AM, klimashkin notifications@github.com wrote:
Hello! When I'm trying to deselect '_id' field in populate (when it is array of refs), then I always get empty array. new mongoose.Schema( { geo: {type: [Number], index: '2d'}, photos: [ { type: Schema.Types.ObjectId, ref: 'Photo' } ] }, { strict: true } ) SomeCollection.find({geo: { "$within": {"$box": box} }}).populate('photos', {_id: 0}).select('-_id photos').exec(function (err, docs) {console.dir(docs); // get here: [ { photos: [] }, { photos: [] }, { photos: [] } ]}); If I don't deselect '_id', than all is ok: photos arra fo each doc is not empty — Reply to this email directly or view it on GitHubhttps://github.com//issues/1331.
SomeCollection.find({geo: { "$within": {"$box": box} }}).populate('photos', {_id: 0}).select('-_id photos').exec(function (err, docs) {console.dir(docs); // get here: [ { photos: [] }, { photos: [] }, { photos: [] } ]});
If I don't deselect '_id', than all is ok: photos arra fo each doc is not empty
— Reply to this email directly or view it on GitHubhttps://github.com//issues/1331.
Aaron @aaronheckmann https://twitter.com/#!/aaronheckmann
Sorry, something went wrong.
fixed; can now deselect populated doc _ids
dc9522c
closes #1331
e1d5b56
No branches or pull requests
Hello!
When I'm trying to deselect '_id' field in populate (when it is array of refs), then I always get empty array.
If I don't deselect '_id', than all is ok: photos array for each doc is not empty
The text was updated successfully, but these errors were encountered: