{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback/issues/1630","labels_url":"https://api.github.com/repos/strongloop/loopback/issues/1630/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback/issues/1630/comments","events_url":"https://api.github.com/repos/strongloop/loopback/issues/1630/events","html_url":"https://github.com/strongloop/loopback/issues/1630","id":103499846,"number":1630,"title":"Why embedsOne document update validates the parent model?","user":{"login":"h2non","id":63402,"avatar_url":"https://avatars.githubusercontent.com/u/63402?v=3","gravatar_id":"","url":"https://api.github.com/users/h2non","html_url":"https://github.com/h2non","followers_url":"https://api.github.com/users/h2non/followers","following_url":"https://api.github.com/users/h2non/following{/other_user}","gists_url":"https://api.github.com/users/h2non/gists{/gist_id}","starred_url":"https://api.github.com/users/h2non/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2non/subscriptions","organizations_url":"https://api.github.com/users/h2non/orgs","repos_url":"https://api.github.com/users/h2non/repos","events_url":"https://api.github.com/users/h2non/events{/privacy}","received_events_url":"https://api.github.com/users/h2non/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback/labels/triage","name":"triage","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"loay","id":1986928,"avatar_url":"https://avatars.githubusercontent.com/u/1986928?v=3","gravatar_id":"","url":"https://api.github.com/users/loay","html_url":"https://github.com/loay","followers_url":"https://api.github.com/users/loay/followers","following_url":"https://api.github.com/users/loay/following{/other_user}","gists_url":"https://api.github.com/users/loay/gists{/gist_id}","starred_url":"https://api.github.com/users/loay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loay/subscriptions","organizations_url":"https://api.github.com/users/loay/orgs","repos_url":"https://api.github.com/users/loay/repos","events_url":"https://api.github.com/users/loay/events{/privacy}","received_events_url":"https://api.github.com/users/loay/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-08-27T12:46:09Z","updated_at":"2015-11-06T20:50:36Z","closed_at":null,"body":"I'm just trying to perform a pretty simple transaction. \r\n\r\nGiven the `User` model, which has one `embedsOne` persisted relations to `stats` and another `embedMany` relation to `settings`, I'm just trying to update one field in the embedded model. \r\n\r\n```js\r\n// `user` is a filled model\r\nuser.stats.update({ likes: 1 }, function (err, stats) {\r\n   // ...\r\n})\r\n```\r\n\r\nBut I'm getting a validation error from the parent `User` model related to `settings` relation:\r\n```js\r\n{\r\n    \"error\": {\r\n        \"name\": \"ValidationError\",\r\n        \"status\": 422,\r\n        \"message\": \"The `user` instance is not valid. Details: `settings` contains invalid item at index `0`: `id` is blank.\"\r\n    }\r\n}\r\n```\r\n\r\nWhy the whole `User` model is validated if I'm just updating a embedded document? \r\nHow can I do that properly?"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback/issues/comments/154529116","html_url":"https://github.com/strongloop/loopback/issues/1630#issuecomment-154529116","issue_url":"https://api.github.com/repos/strongloop/loopback/issues/1630","id":154529116,"user":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T20:50:36Z","updated_at":"2015-11-06T20:50:36Z","body":"@h2non Sorry for the confusion, we have a lot of new people coming on board to help with the triaging of GitHub issues so bear with us. This sounds like a question for @raymondfeng or @fabien."}}