{"action":"opened","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/4775","repository_url":"https://api.github.com/repos/Automattic/mongoose","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/4775/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/4775/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/4775/events","html_url":"https://github.com/Automattic/mongoose/issues/4775","id":193588163,"number":4775,"title":"Invalid atomic update value for $set. Expected an object, received object","user":{"login":"tosbaha","id":971530,"avatar_url":"https://avatars.githubusercontent.com/u/971530?v=3","gravatar_id":"","url":"https://api.github.com/users/tosbaha","html_url":"https://github.com/tosbaha","followers_url":"https://api.github.com/users/tosbaha/followers","following_url":"https://api.github.com/users/tosbaha/following{/other_user}","gists_url":"https://api.github.com/users/tosbaha/gists{/gist_id}","starred_url":"https://api.github.com/users/tosbaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tosbaha/subscriptions","organizations_url":"https://api.github.com/users/tosbaha/orgs","repos_url":"https://api.github.com/users/tosbaha/repos","events_url":"https://api.github.com/users/tosbaha/events{/privacy}","received_events_url":"https://api.github.com/users/tosbaha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-05T19:29:27Z","updated_at":"2016-12-05T19:29:27Z","closed_at":null,"body":"If I try to update my document via \r\n\r\n```javascript\r\nParcel.findOneAndUpdate({_id:parcel.trackingID},{$set:parcel},{new: true},function(err,result) {\r\n    //\r\n})\r\n```\r\n\r\nI get `Invalid atomic update value for $set. Expected an object, received object` error. However if I do, \r\n\r\n```javascript\r\nParcel.findOneAndUpdate({_id:parcel.trackingID},parcel,{new: true},function(err,result) {\r\n  //\r\n})\r\n```\r\n\r\nIt is working without any error. parcel is an object which has the same properties with a schema plus some extra properties. \r\n\r\n\r\n"}}
{"actor":{"display_login":"tosbaha"}}