{"action":"closed","issue":{"url":"https://api.github.com/repos/kvesteri/sqlalchemy-json-api/issues/10","repository_url":"https://api.github.com/repos/kvesteri/sqlalchemy-json-api","labels_url":"https://api.github.com/repos/kvesteri/sqlalchemy-json-api/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/kvesteri/sqlalchemy-json-api/issues/10/comments","events_url":"https://api.github.com/repos/kvesteri/sqlalchemy-json-api/issues/10/events","html_url":"https://github.com/kvesteri/sqlalchemy-json-api/issues/10","id":157337033,"number":10,"title":"Resource identifier objects in relationships array should be sorted","user":{"login":"vesauimonen","id":1443031,"avatar_url":"https://avatars.githubusercontent.com/u/1443031?v=3","gravatar_id":"","url":"https://api.github.com/users/vesauimonen","html_url":"https://github.com/vesauimonen","followers_url":"https://api.github.com/users/vesauimonen/followers","following_url":"https://api.github.com/users/vesauimonen/following{/other_user}","gists_url":"https://api.github.com/users/vesauimonen/gists{/gist_id}","starred_url":"https://api.github.com/users/vesauimonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vesauimonen/subscriptions","organizations_url":"https://api.github.com/users/vesauimonen/orgs","repos_url":"https://api.github.com/users/vesauimonen/repos","events_url":"https://api.github.com/users/vesauimonen/events{/privacy}","received_events_url":"https://api.github.com/users/vesauimonen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-28T12:43:02Z","updated_at":"2016-05-29T08:43:44Z","closed_at":"2016-05-29T08:43:44Z","body":"The resource identifier objects in a resource object's relationship array are not sorted by id:\r\n```python\r\nquery = query_builder.select(Post, fields={'posts': ['comments']})\r\n\r\ndb.session.execute(query).scalar()['data'][0]['relationships']['comments']['data']\r\n\r\n# [\r\n#     {'id': '0fc71c71-50c3-4151-9f07-a0b430eded0e', 'type': 'comments'},\r\n#     {'id': 'e4084592-eb4e-4590-88a5-98f44530bbba', 'type': 'comments'},\r\n#     {'id': '1e37dee3-167d-4d8a-b9ac-457aebcc9d93', 'type': 'comments'},\r\n#     {'id': '44cb8206-ef12-4b3a-bee6-84c44a08bfc0', 'type': 'comments'},\r\n# ]\r\n```\r\n\r\nWhile JSON API 1.0 specification does not require ordering, the array should be sorted to guarantee deterministic results."}}
{"actor":{"display_login":"kvesteri"}}