{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/3205","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/3205/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/3205/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/3205/events","html_url":"https://github.com/Automattic/mongoose/pull/3205","id":97539641,"number":3205,"title":"Bug fix: default fields should not dirty a document across saves","user":{"login":"burtonjc","id":443084,"avatar_url":"https://avatars.githubusercontent.com/u/443084?v=3","gravatar_id":"","url":"https://api.github.com/users/burtonjc","html_url":"https://github.com/burtonjc","followers_url":"https://api.github.com/users/burtonjc/followers","following_url":"https://api.github.com/users/burtonjc/following{/other_user}","gists_url":"https://api.github.com/users/burtonjc/gists{/gist_id}","starred_url":"https://api.github.com/users/burtonjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burtonjc/subscriptions","organizations_url":"https://api.github.com/users/burtonjc/orgs","repos_url":"https://api.github.com/users/burtonjc/repos","events_url":"https://api.github.com/users/burtonjc/events{/privacy}","received_events_url":"https://api.github.com/users/burtonjc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/mongoose/milestones/50","html_url":"https://github.com/Automattic/mongoose/milestones/4.1.1","labels_url":"https://api.github.com/repos/Automattic/mongoose/milestones/50/labels","id":1211321,"number":50,"title":"4.1.1","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":24,"closed_issues":4,"state":"open","created_at":"2015-07-16T14:37:02Z","updated_at":"2015-07-28T15:25:35Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":1,"created_at":"2015-07-27T19:38:32Z","updated_at":"2015-07-28T15:25:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/mongoose/pulls/3205","html_url":"https://github.com/Automattic/mongoose/pull/3205","diff_url":"https://github.com/Automattic/mongoose/pull/3205.diff","patch_url":"https://github.com/Automattic/mongoose/pull/3205.patch"},"body":"Currently, `document#save` does not clear the 'default' dirty cache. This means when you have a schema field with a `default` specified, sequential `document#save` calls will each execute a query even if no document changes occurred. This PR clears the 'default' dirty cache when a model is saved so the dirty check works appropriately across saves."},"comment":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/comments/125653736","html_url":"https://github.com/Automattic/mongoose/pull/3205#issuecomment-125653736","issue_url":"https://api.github.com/repos/Automattic/mongoose/issues/3205","id":125653736,"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-07-28T15:25:38Z","updated_at":"2015-07-28T15:25:38Z","body":"Great work, thanks"}}