Skip to content

Instantly share code, notes, and snippets.

@ngnguyen1
Created August 16, 2016 16:18
Show Gist options
  • Save ngnguyen1/998f7714fb768427abf5838fafa573d7 to your computer and use it in GitHub Desktop.
Save ngnguyen1/998f7714fb768427abf5838fafa573d7 to your computer and use it in GitHub Desktop.
Map
.find({
artistId: Utils.convertToObjectId(user._id)
})
.select("nameUrl status mapType created sliders")
.populate({
path: 'sliders',
select: 'name No createdAt works',
populate: [{
path: 'works',
populate: [{
path: 'WorkIdInfo',
model: 'Work'
}, {
path: 'artistId',
model: 'User',
select: 'userBio'
}]
}]
})
.exec(function(err, _mapdetail) {
log.debug(_mapdetail);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment