{"action":"created","issue":{"url":"https://api.github.com/repos/dixieio/redux-json-api/issues/62","repository_url":"https://api.github.com/repos/dixieio/redux-json-api","labels_url":"https://api.github.com/repos/dixieio/redux-json-api/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/dixieio/redux-json-api/issues/62/comments","events_url":"https://api.github.com/repos/dixieio/redux-json-api/issues/62/events","html_url":"https://github.com/dixieio/redux-json-api/issues/62","id":178374998,"number":62,"title":"When updating state of changed entity related entity is not updated with new relation.","user":{"login":"evolve2k","id":114459,"avatar_url":"https://avatars.githubusercontent.com/u/114459?v=3","gravatar_id":"","url":"https://api.github.com/users/evolve2k","html_url":"https://github.com/evolve2k","followers_url":"https://api.github.com/users/evolve2k/followers","following_url":"https://api.github.com/users/evolve2k/following{/other_user}","gists_url":"https://api.github.com/users/evolve2k/gists{/gist_id}","starred_url":"https://api.github.com/users/evolve2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evolve2k/subscriptions","organizations_url":"https://api.github.com/users/evolve2k/orgs","repos_url":"https://api.github.com/users/evolve2k/repos","events_url":"https://api.github.com/users/evolve2k/events{/privacy}","received_events_url":"https://api.github.com/users/evolve2k/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dixieio/redux-json-api/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2016-09-21T15:06:17Z","updated_at":"2016-10-24T12:36:25Z","closed_at":null,"body":"I'm following the API approach for createEntity.\r\n\r\nI am updating an entity which is a child of a related entity, to illustrate I'll refer to task and TaskList from the official example as it is adequate currently to illustrate my point.\r\n\r\nWhen createEntity is dispatched it is correctly updating the task to my backend. It is also updating state to include the new task BUT TaskList is not having it's state updated to reflect that it now has this additional task related to it and hence in my UI the new task is not showing as only tasks related to my TaskList show.\r\n\r\nShould I be dispatching something further to ensure the TaskList updates to include the new task or should all related entities be updating following the  dispatch(createEntity(entity)) as below.\r\n\r\n_Per: https://github.com/dixieio/redux-json-api/blob/master/docs/apis/createEntity.md_\r\n```\r\nclass CreateTask extends Component {\r\n  handleSubmit() {\r\n    const { dispatch } = this.props;\r\n    const entity = {\r\n      type: 'tasks',\r\n      attributes: {\r\n        task: 'New task name'\r\n      },\r\n      relationships: {\r\n        taskList: {\r\n          data: {\r\n            id: '1',\r\n            type: 'taskLists'   <==== Does this also have its relations updated from the dispatch?\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    dispatch(createEntity(entity));\r\n  }\r\n```"},"comment":{"url":"https://api.github.com/repos/dixieio/redux-json-api/issues/comments/255728149","html_url":"https://github.com/dixieio/redux-json-api/issues/62#issuecomment-255728149","issue_url":"https://api.github.com/repos/dixieio/redux-json-api/issues/62","id":255728149,"user":{"login":"egeriis","id":579824,"avatar_url":"https://avatars.githubusercontent.com/u/579824?v=3","gravatar_id":"","url":"https://api.github.com/users/egeriis","html_url":"https://github.com/egeriis","followers_url":"https://api.github.com/users/egeriis/followers","following_url":"https://api.github.com/users/egeriis/following{/other_user}","gists_url":"https://api.github.com/users/egeriis/gists{/gist_id}","starred_url":"https://api.github.com/users/egeriis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egeriis/subscriptions","organizations_url":"https://api.github.com/users/egeriis/orgs","repos_url":"https://api.github.com/users/egeriis/repos","events_url":"https://api.github.com/users/egeriis/events{/privacy}","received_events_url":"https://api.github.com/users/egeriis/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T12:36:25Z","updated_at":"2016-10-24T12:36:25Z","body":"@evolve2k I left a comment on your gist: https://gist.github.com/evolve2k/e0f3725c32fc3508058503ea75776f6e"}}
{"actor":{"display_login":"egeriis"}}