{"action":"closed","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/3750","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/3750/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/3750/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/3750/events","html_url":"https://github.com/Automattic/mongoose/issues/3750","id":125993151,"number":3750,"title":".save is not working","user":{"login":"abhishekdgeek","id":6406766,"avatar_url":"https://avatars.githubusercontent.com/u/6406766?v=3","gravatar_id":"","url":"https://api.github.com/users/abhishekdgeek","html_url":"https://github.com/abhishekdgeek","followers_url":"https://api.github.com/users/abhishekdgeek/followers","following_url":"https://api.github.com/users/abhishekdgeek/following{/other_user}","gists_url":"https://api.github.com/users/abhishekdgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/abhishekdgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhishekdgeek/subscriptions","organizations_url":"https://api.github.com/users/abhishekdgeek/orgs","repos_url":"https://api.github.com/users/abhishekdgeek/repos","events_url":"https://api.github.com/users/abhishekdgeek/events{/privacy}","received_events_url":"https://api.github.com/users/abhishekdgeek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-11T17:15:51Z","updated_at":"2016-01-12T14:42:18Z","closed_at":"2016-01-12T14:42:18Z","body":"This is the entry (DB document) I want to update:\r\n```\r\n{\r\n    \"_id\" : ObjectId(\"5670eea265eb9c54068f523a\"),\r\n    \"index_id\" : \"66\",\r\n    \"social_status\" : {\r\n        \"status\" : \"inactive\",\r\n        \"twstatus\" : \"active\",\r\n        \"fbstatus\" : \"active\"\r\n    },\r\n    \"createdBy\" : ObjectId(\"55348d1399b83d36278b2318\"),\r\n    \"title\" : \"Abhishek Jain\",\r\n    \"description\" : \"Abhishek Jain\",\r\n    \"users\" : [ \r\n        ObjectId(\"55348d1399b83d36278b2318\"),\r\n        ObjectId(\"55c98b9395ec344907cfcc2d\")\r\n    ],\r\n    \"created\" : ISODate(\"2015-12-16T04:54:58.153Z\"),\r\n    \"__v\" : 4,\r\n    \"myPlan\" : ObjectId(\"5672680f65eb9c54068f64a4\")\r\n}\r\n```\r\n\r\nCode:\r\n```\r\nEntity = mongoose.model('Entity');\r\nvar entityId = req.params.entityId\r\nEntity.findOne({\r\n\t\"index_id\": entityId\r\n\t}, function (err, entity) {\r\n\t\tentity.social_status.status = \"active\"\r\n\t\tentity.save(function (err) {\r\n\t\t\tif (err) {\r\n\t\t\t\tres.status(400).json({\r\n\t\t\t\t\tmessage: err\r\n\t\t\t\t})\r\n\t\t\t} else {\r\n\t\t\t\tres.json('updated');\r\n\t\t\t\tconsole.log(entity); // says status is updated in console but nothing happens in DB.\r\n\t\t\t}\r\n\t\t})\r\n\t})\r\n});\r\n```\r\n\r\nBasically I want to update social_status.status to active. Let me know what's wrong.\r\nI get updated as response but the data in DB remains the same."}}