{"action":"closed","issue":{"url":"https://api.github.com/repos/js-data/js-data/issues/124","labels_url":"https://api.github.com/repos/js-data/js-data/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/js-data/js-data/issues/124/comments","events_url":"https://api.github.com/repos/js-data/js-data/issues/124/events","html_url":"https://github.com/js-data/js-data/issues/124","id":69135723,"number":124,"title":"endpoint for relations","user":{"login":"tflori","id":4855611,"avatar_url":"https://avatars.githubusercontent.com/u/4855611?v=3","gravatar_id":"","url":"https://api.github.com/users/tflori","html_url":"https://github.com/tflori","followers_url":"https://api.github.com/users/tflori/followers","following_url":"https://api.github.com/users/tflori/following{/other_user}","gists_url":"https://api.github.com/users/tflori/gists{/gist_id}","starred_url":"https://api.github.com/users/tflori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tflori/subscriptions","organizations_url":"https://api.github.com/users/tflori/orgs","repos_url":"https://api.github.com/users/tflori/repos","events_url":"https://api.github.com/users/tflori/events{/privacy}","received_events_url":"https://api.github.com/users/tflori/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-17T13:10:18Z","updated_at":"2015-04-26T01:18:22Z","closed_at":"2015-04-26T01:18:22Z","body":"The API we are quering has a resource called tree element. it has children but is not sending these childrin together with the parent. The children are only accessible by quering tree_element/{ID}/children.\r\n\r\nIt will be nice to define it like this:\r\n```javascript\r\nDS.defineResource({\r\n  name: 'TreeElement',\r\n  endpoint: 'tree_element,\r\n  relations: {\r\n    Children: {\r\n      cardinality: 'OneToMany'\r\n      resource: 'TreeElement',\r\n      endpoint: 'children',\r\n      parent: true // creates link 'tree_element/{ID}/children'\r\n    },\r\n    Parents: {\r\n      resource: 'TreeElement',\r\n      endpoint: 'tree_element/{ID}/parents\r\n    }\r\n  }\r\n});\r\n```"}}