{"action":"created","issue":{"url":"https://api.github.com/repos/eoyilmaz/stalker/issues/62","repository_url":"https://api.github.com/repos/eoyilmaz/stalker","labels_url":"https://api.github.com/repos/eoyilmaz/stalker/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/eoyilmaz/stalker/issues/62/comments","events_url":"https://api.github.com/repos/eoyilmaz/stalker/issues/62/events","html_url":"https://github.com/eoyilmaz/stalker/issues/62","id":330195551,"node_id":"MDU6SXNzdWUzMzAxOTU1NTE=","number":62,"title":"Help with SQL query","user":{"login":"fredrikaverpil","id":994357,"node_id":"MDQ6VXNlcjk5NDM1Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/994357?v=4","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-06-07T09:43:44Z","updated_at":"2018-06-14T05:52:49Z","closed_at":"2018-06-14T05:52:49Z","author_association":"CONTRIBUTOR","body":"Hi @eoyilmaz ,\r\n\r\nI have the following query:\r\n\r\n```\r\nversions_id_list = [ ... ]\r\nversions = DBSession.query(Version.id, Version.created_with, Version.name,\r\n                            Version.take_name, Version.version_number,\r\n                            Version.created_by_id, Version.updated_by_id,\r\n                            Version.generic_text).filter(\r\n                                Version.id.in_(versions_id_list)).all()\r\n```\r\n\r\nBut I would also like to the tags for each version tuple returned (or more preferably, a list of tag IDs). I can't just append `Version.tags` in that query, as it's not a simple `Version` attribute.\r\n\r\nHow would you do recommend I do this without affecting performance too negatively?\r\nI can easily just perform a query for each returned version, but the way I do this currently, it affects performance negatively when dealing with a large set of versions.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eoyilmaz/stalker/issues/comments/397179299","html_url":"https://github.com/eoyilmaz/stalker/issues/62#issuecomment-397179299","issue_url":"https://api.github.com/repos/eoyilmaz/stalker/issues/62","id":397179299,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzE3OTI5OQ==","user":{"login":"fredrikaverpil","id":994357,"node_id":"MDQ6VXNlcjk5NDM1Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/994357?v=4","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T05:52:49Z","updated_at":"2018-06-14T05:52:49Z","author_association":"CONTRIBUTOR","body":"Fantastic, thank you so much!"}}
{"actor":{"display_login":"fredrikaverpil"}}