{"action":"created","issue":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/8580","labels_url":"https://api.github.com/repos/Elgg/Elgg/issues/8580/labels{/name}","comments_url":"https://api.github.com/repos/Elgg/Elgg/issues/8580/comments","events_url":"https://api.github.com/repos/Elgg/Elgg/issues/8580/events","html_url":"https://github.com/Elgg/Elgg/issues/8580","id":90758939,"number":8580,"title":"custom JOINs are being added above core JOINS in elgg_get_entities_from_annotation_calculation?","user":{"login":"propertunist","id":513903,"avatar_url":"https://avatars.githubusercontent.com/u/513903?v=3","gravatar_id":"","url":"https://api.github.com/users/propertunist","html_url":"https://github.com/propertunist","followers_url":"https://api.github.com/users/propertunist/followers","following_url":"https://api.github.com/users/propertunist/following{/other_user}","gists_url":"https://api.github.com/users/propertunist/gists{/gist_id}","starred_url":"https://api.github.com/users/propertunist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/propertunist/subscriptions","organizations_url":"https://api.github.com/users/propertunist/orgs","repos_url":"https://api.github.com/users/propertunist/repos","events_url":"https://api.github.com/users/propertunist/events{/privacy}","received_events_url":"https://api.github.com/users/propertunist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-24T18:57:04Z","updated_at":"2015-06-24T20:00:08Z","closed_at":null,"body":"as is documented in this community thread, when i provide a JOIN parameter to elgg_get_entities_from_annotation_calculation that references an alias that is created in the core code, an SQL error is thrown:\r\n\r\nhttps://community.elgg.org/discussion/view/2223883/changing-the-sequence-of-where-clauses-in-elgg-get-entities-from-annotation-calculation\r\n\r\nthis appears to be because my join is being used in the final query above/before the core JOIN that contains the alias that i am referencing. as matt stated, the custom JOINs would be more appropriately added after the core JOINs."},"comment":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/comments/114993807","html_url":"https://github.com/Elgg/Elgg/issues/8580#issuecomment-114993807","issue_url":"https://api.github.com/repos/Elgg/Elgg/issues/8580","id":114993807,"user":{"login":"hypeJunction","id":1202761,"avatar_url":"https://avatars.githubusercontent.com/u/1202761?v=3","gravatar_id":"","url":"https://api.github.com/users/hypeJunction","html_url":"https://github.com/hypeJunction","followers_url":"https://api.github.com/users/hypeJunction/followers","following_url":"https://api.github.com/users/hypeJunction/following{/other_user}","gists_url":"https://api.github.com/users/hypeJunction/gists{/gist_id}","starred_url":"https://api.github.com/users/hypeJunction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypeJunction/subscriptions","organizations_url":"https://api.github.com/users/hypeJunction/orgs","repos_url":"https://api.github.com/users/hypeJunction/repos","events_url":"https://api.github.com/users/hypeJunction/events{/privacy}","received_events_url":"https://api.github.com/users/hypeJunction/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T20:00:08Z","updated_at":"2015-06-24T20:00:08Z","body":"Writing a custom query was inefficient, I just created a metadata that is\nupdated when annotations are created/updated/deleted.\nOn Jun 24, 2015 9:34 PM, \"ura soul\" <notifications@github.com> wrote:\n\n> what did you use as a workaround?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/Elgg/Elgg/issues/8580#issuecomment-114988608>.\n>\n"}}