{"action":"closed","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/3265","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/3265/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/3265/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/3265/events","html_url":"https://github.com/Automattic/mongoose/issues/3265","id":100802851,"number":3265,"title":"$set doesn't update subdocument","user":{"login":"jeffwhelpley","id":1870060,"avatar_url":"https://avatars.githubusercontent.com/u/1870060?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffwhelpley","html_url":"https://github.com/jeffwhelpley","followers_url":"https://api.github.com/users/jeffwhelpley/followers","following_url":"https://api.github.com/users/jeffwhelpley/following{/other_user}","gists_url":"https://api.github.com/users/jeffwhelpley/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffwhelpley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffwhelpley/subscriptions","organizations_url":"https://api.github.com/users/jeffwhelpley/orgs","repos_url":"https://api.github.com/users/jeffwhelpley/repos","events_url":"https://api.github.com/users/jeffwhelpley/events{/privacy}","received_events_url":"https://api.github.com/users/jeffwhelpley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/mongoose/milestones/54","html_url":"https://github.com/Automattic/mongoose/milestones/4.1.4","labels_url":"https://api.github.com/repos/Automattic/mongoose/milestones/54/labels","id":1251783,"number":54,"title":"4.1.4","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":20,"closed_issues":7,"state":"open","created_at":"2015-08-12T14:08:51Z","updated_at":"2015-08-25T13:43:30Z","due_on":"2015-08-28T04:00:00Z","closed_at":null},"comments":2,"created_at":"2015-08-13T15:45:07Z","updated_at":"2015-08-25T13:43:30Z","closed_at":"2015-08-25T13:43:30Z","body":"When I do this in mongoose 4.1.2:\r\n\r\n```\r\nuser.findOneAndUpdate({ _id: someid }, { $set: { field1: 'val1', field2: { subfield1: 'sub1', subfield2: 'sub2' }}});\r\n```\r\n\r\nfield1 is updated, but field2 is not. When I downgrade to mongoose 4.0.6 this works fine."}}