{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/2876","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/2876/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/2876/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/2876/events","html_url":"https://github.com/Automattic/mongoose/issues/2876","id":68405142,"number":2876,"title":"Field is undefined when using + with select","user":{"login":"JonWatkins","id":1455014,"avatar_url":"https://avatars.githubusercontent.com/u/1455014?v=3","gravatar_id":"","url":"https://api.github.com/users/JonWatkins","html_url":"https://github.com/JonWatkins","followers_url":"https://api.github.com/users/JonWatkins/followers","following_url":"https://api.github.com/users/JonWatkins/following{/other_user}","gists_url":"https://api.github.com/users/JonWatkins/gists{/gist_id}","starred_url":"https://api.github.com/users/JonWatkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonWatkins/subscriptions","organizations_url":"https://api.github.com/users/JonWatkins/orgs","repos_url":"https://api.github.com/users/JonWatkins/repos","events_url":"https://api.github.com/users/JonWatkins/events{/privacy}","received_events_url":"https://api.github.com/users/JonWatkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/mongoose/milestones/37","html_url":"https://github.com/Automattic/mongoose/milestones/3.8.27","labels_url":"https://api.github.com/repos/Automattic/mongoose/milestones/37/labels","id":1047806,"number":37,"title":"3.8.27","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":7,"closed_issues":3,"state":"open","created_at":"2015-03-31T22:06:53Z","updated_at":"2015-04-14T15:38:21Z","due_on":"2015-04-24T04:00:00Z","closed_at":null},"comments":2,"created_at":"2015-04-14T15:10:35Z","updated_at":"2015-04-14T16:34:47Z","closed_at":null,"body":"I have a model plugin that handles our authentication for users. Inside the plugin I have added some additional fields, the one causing the issue is the password.\r\n\r\n```\r\nschema.add({\r\n password: { type: String, select: false }\r\n});\r\n```\r\n\r\nThen in my passport library I call findOne but request that the password is returned. In the callback method for this call I have tried to console log both the document and the password, The document is always there, but password is always undefined. This had been working until a few hours ago\r\n\r\n```\r\nUser.findOne({ email: emailAddr }, '+password', function (err, doc) {\r\n   console.log(doc.password, doc);\r\n});\r\n```\r\n\r\nThis has been working for quite some time and just suddenly stopped working after an npm install, I did check and the version installed matches the package.json\r\n\r\nTried deleting the node_modules folder and running npm cache clear and npm update, Still no luck. Has anyone else had the same issue?\r\n\r\nUsing mongoose 3.8.26 on ubuntu 14, using node version 0.10.25."},"comment":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/comments/92962385","html_url":"https://github.com/Automattic/mongoose/issues/2876#issuecomment-92962385","issue_url":"https://api.github.com/repos/Automattic/mongoose/issues/2876","id":92962385,"user":{"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},"created_at":"2015-04-14T16:34:47Z","updated_at":"2015-04-14T16:34:47Z","body":"That's strange. What does the full document look like?"}}