{"action":"created","issue":{"url":"https://api.github.com/repos/Yomguithereal/baobab/issues/323","labels_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/323/comments","events_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/323/events","html_url":"https://github.com/Yomguithereal/baobab/issues/323","id":98636969,"number":323,"title":"v2: `set` from facet fails","user":{"login":"saulshanabrook","id":1186124,"avatar_url":"https://avatars.githubusercontent.com/u/1186124?v=3","gravatar_id":"","url":"https://api.github.com/users/saulshanabrook","html_url":"https://github.com/saulshanabrook","followers_url":"https://api.github.com/users/saulshanabrook/followers","following_url":"https://api.github.com/users/saulshanabrook/following{/other_user}","gists_url":"https://api.github.com/users/saulshanabrook/gists{/gist_id}","starred_url":"https://api.github.com/users/saulshanabrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saulshanabrook/subscriptions","organizations_url":"https://api.github.com/users/saulshanabrook/orgs","repos_url":"https://api.github.com/users/saulshanabrook/repos","events_url":"https://api.github.com/users/saulshanabrook/events{/privacy}","received_events_url":"https://api.github.com/users/saulshanabrook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-02T20:57:40Z","updated_at":"2015-08-04T06:53:25Z","closed_at":null,"body":"When I try calling `tree.set({})`, where the tree contains a facet (called `$system`)\r\n\r\n```javascript\r\nUncaught TypeError: Cannot assign to read only property '$system' of #<Object>\r\n    at solveMask (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:312:15)\r\n    at solveMask (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:321:7)\r\n    at solveMask (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:321:7)\r\n    at solveMask (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:321:7)\r\n    at getIn (eval at <anonymous> (http://localhost:8080/main.js:1970:2), <anonymous>:396:23)\r\n    at Baobab.update (eval at <anonymous> (http://localhost:8080/main.js:1946:2), <anonymous>:274:39)\r\n    at Cursor.(anonymous function) [as set] (eval at <anonymous> (http://localhost:8080/main.js:1964:2), <anonymous>:800:22)\r\n    at Baobab._this.(anonymous function) [as set] (eval at <anonymous> (http://localhost:8080/main.js:1946:2), <anonymous>:142:33)\r\n    at Object.eval (eval at evaluate (unknown source), <anonymous>:1:6)\r\n    at Object.InjectedScript._evaluateOn (<anonymous>:875:55)\r\n```\r\n\r\nDo you think there is a possibility of using a method like set in a path that does have facets? And just replacing the data?\r\n"},"comment":{"url":"https://api.github.com/repos/Yomguithereal/baobab/issues/comments/127500351","html_url":"https://github.com/Yomguithereal/baobab/issues/323#issuecomment-127500351","issue_url":"https://api.github.com/repos/Yomguithereal/baobab/issues/323","id":127500351,"user":{"login":"christianalfoni","id":3956929,"avatar_url":"https://avatars.githubusercontent.com/u/3956929?v=3","gravatar_id":"","url":"https://api.github.com/users/christianalfoni","html_url":"https://github.com/christianalfoni","followers_url":"https://api.github.com/users/christianalfoni/followers","following_url":"https://api.github.com/users/christianalfoni/following{/other_user}","gists_url":"https://api.github.com/users/christianalfoni/gists{/gist_id}","starred_url":"https://api.github.com/users/christianalfoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christianalfoni/subscriptions","organizations_url":"https://api.github.com/users/christianalfoni/orgs","repos_url":"https://api.github.com/users/christianalfoni/repos","events_url":"https://api.github.com/users/christianalfoni/events{/privacy}","received_events_url":"https://api.github.com/users/christianalfoni/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T06:53:25Z","updated_at":"2015-08-04T06:53:25Z","body":"And hi again!\r\n\r\nJust wanted to mention I made a fix to this in Cerebral-Baobab-React. It traverses the tree and skips facets, and set all other values. It is not the most performant way, but it works for now.\r\n\r\nMaybe this is an idea for \"set\" of Baobab? Or event its own \"import\"?"}}