{"action":"created","issue":{"url":"https://api.github.com/repos/wvteijlingen/Spine/issues/65","repository_url":"https://api.github.com/repos/wvteijlingen/Spine","labels_url":"https://api.github.com/repos/wvteijlingen/Spine/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/wvteijlingen/Spine/issues/65/comments","events_url":"https://api.github.com/repos/wvteijlingen/Spine/issues/65/events","html_url":"https://github.com/wvteijlingen/Spine/issues/65","id":131856266,"number":65,"title":"ToManyRelationship and included resources","user":{"login":"Alak","id":1191656,"avatar_url":"https://avatars.githubusercontent.com/u/1191656?v=3","gravatar_id":"","url":"https://api.github.com/users/Alak","html_url":"https://github.com/Alak","followers_url":"https://api.github.com/users/Alak/followers","following_url":"https://api.github.com/users/Alak/following{/other_user}","gists_url":"https://api.github.com/users/Alak/gists{/gist_id}","starred_url":"https://api.github.com/users/Alak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alak/subscriptions","organizations_url":"https://api.github.com/users/Alak/orgs","repos_url":"https://api.github.com/users/Alak/repos","events_url":"https://api.github.com/users/Alak/events{/privacy}","received_events_url":"https://api.github.com/users/Alak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-06T13:39:02Z","updated_at":"2016-02-07T21:00:52Z","closed_at":null,"body":"Hey,\r\n\r\nHere is my json : \r\n```\r\n{\r\n    \"data\": {\r\n        \"type\": \"ads\",\r\n        \"id\": \"671\",\r\n        \"attributes\": {\r\n            \"id\": 671,\r\n            \"title\": \"SONY TV (de 32 pouces)\",\r\n        },\r\n        \"relationships\": {\r\n            \"seller\": {\r\n                \"data\": {\r\n                    \"type\": \"persons\",\r\n                    \"id\": \"95vl7\"\r\n                }\r\n            },\r\n        }\r\n    },\r\n    \"included\": [\r\n        {\r\n            \"type\": \"persons\",\r\n            \"id\": \"95vl7\",\r\n            \"attributes\": {\r\n                \"hash\": \"95vl7\",\r\n                \"surname\": \"Prawidlo\",\r\n                \"given_name\": \"Marine\",\r\n                \"verified\": true,\r\n                \"gamification_level\": 3,\r\n                \"avatar_url_pattern\": \"/users/{id}/avatars/{width}x{height}/{cropped}\"\r\n            },\r\n            \"relationships\": {\r\n                \"friends\": {\r\n                    \"data\": [\r\n                        {\"type\": \"persons\", \"id\": \"87aY7\"},\r\n                        {\"type\": \"persons\", \"id\": \"xN21b\"}\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"type\": \"persons\",\r\n            \"id\": \"87aY7\",\r\n            \"attributes\": {\r\n                \"hash\": \"87aY7\",\r\n                \"surname\": \"Abergel\",\r\n                \"given_name\": \"Arthur\",\r\n                \"verified\": true,\r\n                \"gamification_level\": 3,\r\n                \"avatar_url_pattern\": \"/users/{id}/avatars/{width}x{height}/{cropped}\"\r\n            }\r\n        },\r\n        {\r\n            \"type\": \"persons\",\r\n            \"id\": \"xN21b\",\r\n            \"attributes\": {\r\n                \"hash\": \"xN21b\",\r\n                \"surname\": \"Dubreuil\",\r\n                \"given_name\": \"Jeremy\",\r\n                \"verified\": true,\r\n                \"gamification_level\": 3,\r\n                \"avatar_url_pattern\": \"/users/{id}/avatars/{width}x{height}/{cropped}\"\r\n            }\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\nMy query code : \r\n```\r\nlet spine = Spine(baseURL: url)\r\n        \r\n// Registering entities\r\nspine.registerResource(Ad)\r\nspine.registerResource(User)\r\nvar query = Query(resourceType: Ad.self, resourceIDs: [\"691\"])\r\nquery.include(\"evaluations\", \"seller.friends\")\r\nspine.find(query).onSuccess(callback: { (resources, meta, jsonapi) -> Void in\r\n      print(\"success\")\r\n}).onFailure { (error) -> Void in\r\n      print(error)\r\n}\r\n```\r\n\r\nmy errors : \r\n\r\n```\r\n❕ Info    - Cannot resolve to-many link persons:87aY7 - friends because the linked collection is not fetched.\r\n❕ Info    - Cannot resolve to-many link persons:xN21b - friends because the linked collection is not fetched.\r\n```\r\n\r\nI don't really understand why. Any idea?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/wvteijlingen/Spine/issues/comments/181115597","html_url":"https://github.com/wvteijlingen/Spine/issues/65#issuecomment-181115597","issue_url":"https://api.github.com/repos/wvteijlingen/Spine/issues/65","id":181115597,"user":{"login":"Alak","id":1191656,"avatar_url":"https://avatars.githubusercontent.com/u/1191656?v=3","gravatar_id":"","url":"https://api.github.com/users/Alak","html_url":"https://github.com/Alak","followers_url":"https://api.github.com/users/Alak/followers","following_url":"https://api.github.com/users/Alak/following{/other_user}","gists_url":"https://api.github.com/users/Alak/gists{/gist_id}","starred_url":"https://api.github.com/users/Alak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alak/subscriptions","organizations_url":"https://api.github.com/users/Alak/orgs","repos_url":"https://api.github.com/users/Alak/repos","events_url":"https://api.github.com/users/Alak/events{/privacy}","received_events_url":"https://api.github.com/users/Alak/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T21:00:52Z","updated_at":"2016-02-07T21:00:52Z","body":"Ok, thanks for your answers, I'll try it tomorrow :)"}}