{"action":"reopened","issue":{"url":"https://api.github.com/repos/tgriesser/knex/issues/259","labels_url":"https://api.github.com/repos/tgriesser/knex/issues/259/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/259/comments","events_url":"https://api.github.com/repos/tgriesser/knex/issues/259/events","html_url":"https://github.com/tgriesser/knex/issues/259","id":32646231,"number":259,"title":"Immutable Joins","user":{"login":"ericclemmons","id":15182,"avatar_url":"https://avatars.githubusercontent.com/u/15182?v=3","gravatar_id":"","url":"https://api.github.com/users/ericclemmons","html_url":"https://github.com/ericclemmons","followers_url":"https://api.github.com/users/ericclemmons/followers","following_url":"https://api.github.com/users/ericclemmons/following{/other_user}","gists_url":"https://api.github.com/users/ericclemmons/gists{/gist_id}","starred_url":"https://api.github.com/users/ericclemmons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericclemmons/subscriptions","organizations_url":"https://api.github.com/users/ericclemmons/orgs","repos_url":"https://api.github.com/users/ericclemmons/repos","events_url":"https://api.github.com/users/ericclemmons/events{/privacy}","received_events_url":"https://api.github.com/users/ericclemmons/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tgriesser/knex/labels/feature%20request","name":"feature request","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-05-01T20:46:03Z","updated_at":"2015-06-23T04:32:20Z","closed_at":null,"body":"Howdy!\r\n\r\nMy project uses composition to build the query depending on the requested tables/columns.\r\n\r\nBecause of this, each \"term\" modifies the query solely based on what it needs to get that single column.  As expected, several columns may depend on the same \"join\", but, when they both compose the same builder, there's an error in the SQL because of a non-unique alias.\r\n\r\nI would expect that joining on the same table with the same clause would effectively be a no-op (unless the join type differed, in which case I'd throw an exception).\r\n\r\nThoughts?"}}