{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/1567","repository_url":"https://api.github.com/repos/Automattic/mongoose","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/1567/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/1567/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/1567/events","html_url":"https://github.com/Automattic/mongoose/issues/1567","id":16304063,"number":1567,"title":"Unable to fetch _id object from find method.","user":{"login":"justin-john","id":2345128,"avatar_url":"https://avatars.githubusercontent.com/u/2345128?v=3","gravatar_id":"","url":"https://api.github.com/users/justin-john","html_url":"https://github.com/justin-john","followers_url":"https://api.github.com/users/justin-john/followers","following_url":"https://api.github.com/users/justin-john/following{/other_user}","gists_url":"https://api.github.com/users/justin-john/gists{/gist_id}","starred_url":"https://api.github.com/users/justin-john/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justin-john/subscriptions","organizations_url":"https://api.github.com/users/justin-john/orgs","repos_url":"https://api.github.com/users/justin-john/repos","events_url":"https://api.github.com/users/justin-john/events{/privacy}","received_events_url":"https://api.github.com/users/justin-john/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2013-07-03T06:55:45Z","updated_at":"2016-12-31T01:45:40Z","closed_at":"2013-07-03T20:12:46Z","body":"I have created a some mongo documents via shell\n\n```\ndb.users.insert([{ _id: 1, name: \"angel\" },\n    { _id: 2, name: \"justin\" },\n    { name: \"rose\" }]);\n```\n\nI have queried mongoose find to retrieve all users.\n\n``` javascript\nmodel.find(function (err, users) {\n    if (err) {\n        console.log(err);\n    } else {\n        console.log(users);\n    }\n});\n```\n\nThe console shows as\n\n```\n[ { name: 'angel' },\n  { name: 'justin' },\n  { _id: 51d3c4a113cfcdb762000000, name: 'rose' } ]\n```\n\nIt is missing `_id` in first two records as I have created `_id` for those records. The third one returns `_id`.\n\nThe schema for users \n\n```\nUserSchema = new Schema({\n    name: String\n}),\n```\n\nWhy I am unable to fetch `_id` on manually created `_id`? \n"},"comment":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/comments/269842722","html_url":"https://github.com/Automattic/mongoose/issues/1567#issuecomment-269842722","issue_url":"https://api.github.com/repos/Automattic/mongoose/issues/1567","id":269842722,"user":{"login":"joetidee","id":8842431,"avatar_url":"https://avatars.githubusercontent.com/u/8842431?v=3","gravatar_id":"","url":"https://api.github.com/users/joetidee","html_url":"https://github.com/joetidee","followers_url":"https://api.github.com/users/joetidee/followers","following_url":"https://api.github.com/users/joetidee/following{/other_user}","gists_url":"https://api.github.com/users/joetidee/gists{/gist_id}","starred_url":"https://api.github.com/users/joetidee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joetidee/subscriptions","organizations_url":"https://api.github.com/users/joetidee/orgs","repos_url":"https://api.github.com/users/joetidee/repos","events_url":"https://api.github.com/users/joetidee/events{/privacy}","received_events_url":"https://api.github.com/users/joetidee/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T01:45:40Z","updated_at":"2016-12-31T01:45:40Z","body":"I am having exactly the same issue in Mongoose v4.7.3 and it is inconvenient to not have the _id field returned if it is a String. Even more so that it is returned sporadically. Can it be returned regardless of type, perhaps in a future release?"}}
{"actor":{"display_login":"joetidee"}}