{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/4377","repository_url":"https://api.github.com/repos/Automattic/mongoose","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/4377/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/4377/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/4377/events","html_url":"https://github.com/Automattic/mongoose/issues/4377","id":168255655,"number":4377,"title":"populate doesn't include virtuals when populate multiple documents","user":{"login":"Fonger","id":5862369,"avatar_url":"https://avatars.githubusercontent.com/u/5862369?v=3","gravatar_id":"","url":"https://api.github.com/users/Fonger","html_url":"https://github.com/Fonger","followers_url":"https://api.github.com/users/Fonger/followers","following_url":"https://api.github.com/users/Fonger/following{/other_user}","gists_url":"https://api.github.com/users/Fonger/gists{/gist_id}","starred_url":"https://api.github.com/users/Fonger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fonger/subscriptions","organizations_url":"https://api.github.com/users/Fonger/orgs","repos_url":"https://api.github.com/users/Fonger/repos","events_url":"https://api.github.com/users/Fonger/events{/privacy}","received_events_url":"https://api.github.com/users/Fonger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/mongoose/labels/needs%20clarification","name":"needs clarification","color":"EB219B"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Automattic/mongoose/milestones/121","html_url":"https://github.com/Automattic/mongoose/milestones/4.5.11","labels_url":"https://api.github.com/repos/Automattic/mongoose/milestones/121/labels","id":1913544,"number":121,"title":"4.5.11","description":"","creator":{"login":"vkarpov15","id":1620265,"avatar_url":"https://avatars.githubusercontent.com/u/1620265?v=3","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2016-07-30T20:32:19Z","updated_at":"2016-08-01T22:09:34Z","due_on":"2016-08-29T07:00:00Z","closed_at":null},"comments":2,"created_at":"2016-07-29T05:51:24Z","updated_at":"2016-08-02T15:25:58Z","closed_at":null,"body":"I have set these schema options.\r\n```js\r\nresourceSchema.set('toObject', {\r\n    virtuals: true\r\n});\r\n\r\nresourceSchema.set('toJSON', {\r\n    virtuals: true\r\n});\r\n```\r\n\r\n`User.findOne(xxx).populate('_resource')` works perfectly and populate with virtual fields.\r\n\r\nWhen I use\r\n`User.find(yyy).populate('_resource')` it does populate _resource but there are no virtual fields.\r\n\r\nIs this a feature or a bug?\r\nThanks for reply\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/comments/236940279","html_url":"https://github.com/Automattic/mongoose/issues/4377#issuecomment-236940279","issue_url":"https://api.github.com/repos/Automattic/mongoose/issues/4377","id":236940279,"user":{"login":"Fonger","id":5862369,"avatar_url":"https://avatars.githubusercontent.com/u/5862369?v=3","gravatar_id":"","url":"https://api.github.com/users/Fonger","html_url":"https://github.com/Fonger","followers_url":"https://api.github.com/users/Fonger/followers","following_url":"https://api.github.com/users/Fonger/following{/other_user}","gists_url":"https://api.github.com/users/Fonger/gists{/gist_id}","starred_url":"https://api.github.com/users/Fonger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fonger/subscriptions","organizations_url":"https://api.github.com/users/Fonger/orgs","repos_url":"https://api.github.com/users/Fonger/repos","events_url":"https://api.github.com/users/Fonger/events{/privacy}","received_events_url":"https://api.github.com/users/Fonger/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T15:25:58Z","updated_at":"2016-08-02T15:25:58Z","body":"Sorry, typo again.\r\nYes, they are populated. but virtuals are just not there at all"}}
{"actor":{"display_login":"Fonger"}}