{"action":"opened","issue":{"url":"https://api.github.com/repos/jarektkaczyk/eloquence/issues/76","repository_url":"https://api.github.com/repos/jarektkaczyk/eloquence","labels_url":"https://api.github.com/repos/jarektkaczyk/eloquence/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/jarektkaczyk/eloquence/issues/76/comments","events_url":"https://api.github.com/repos/jarektkaczyk/eloquence/issues/76/events","html_url":"https://github.com/jarektkaczyk/eloquence/issues/76","id":145174547,"number":76,"title":"Searchable: self-joined relations‏","user":{"login":"theplayer777","id":3862335,"avatar_url":"https://avatars.githubusercontent.com/u/3862335?v=3","gravatar_id":"","url":"https://api.github.com/users/theplayer777","html_url":"https://github.com/theplayer777","followers_url":"https://api.github.com/users/theplayer777/followers","following_url":"https://api.github.com/users/theplayer777/following{/other_user}","gists_url":"https://api.github.com/users/theplayer777/gists{/gist_id}","starred_url":"https://api.github.com/users/theplayer777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theplayer777/subscriptions","organizations_url":"https://api.github.com/users/theplayer777/orgs","repos_url":"https://api.github.com/users/theplayer777/repos","events_url":"https://api.github.com/users/theplayer777/events{/privacy}","received_events_url":"https://api.github.com/users/theplayer777/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-01T12:56:33Z","updated_at":"2016-04-01T12:56:33Z","closed_at":null,"body":"Hello,\r\n\r\nFirst I’d like to thank you for your Searchable extension for Laravel. It’s really great and it saved me a lot of time! Despite that, I still have some issue using it for “complex” research: I want to make research through multiple self-joined relations, here is an example:\r\n\r\nIn my model, companies can have multiple addresses. Addresses are each linked to one location (city). Finally, a location can have multiple parent locations (city->region->country). I want to be able to search companies by their location name (“addresses.location.name”) but also by their parent location name doing something like “addresses.location.parent.name”, but this returns me an error:\r\n\r\nSQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'location'\r\n\r\nI think it’s because the query tries to join location table multiple times without using aliases… Do you think there’s any possibility to do something similar with this model?\r\n\r\nThank you in advance"}}