{"action":"created","issue":{"url":"https://api.github.com/repos/tkaczmarzyk/specification-arg-resolver/issues/10","labels_url":"https://api.github.com/repos/tkaczmarzyk/specification-arg-resolver/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/tkaczmarzyk/specification-arg-resolver/issues/10/comments","events_url":"https://api.github.com/repos/tkaczmarzyk/specification-arg-resolver/issues/10/events","html_url":"https://github.com/tkaczmarzyk/specification-arg-resolver/issues/10","id":119964068,"number":10,"title":"Specification for join fetching","user":{"login":"geraldhumphries","id":5278953,"avatar_url":"https://avatars.githubusercontent.com/u/5278953?v=3","gravatar_id":"","url":"https://api.github.com/users/geraldhumphries","html_url":"https://github.com/geraldhumphries","followers_url":"https://api.github.com/users/geraldhumphries/followers","following_url":"https://api.github.com/users/geraldhumphries/following{/other_user}","gists_url":"https://api.github.com/users/geraldhumphries/gists{/gist_id}","starred_url":"https://api.github.com/users/geraldhumphries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geraldhumphries/subscriptions","organizations_url":"https://api.github.com/users/geraldhumphries/orgs","repos_url":"https://api.github.com/users/geraldhumphries/repos","events_url":"https://api.github.com/users/geraldhumphries/events{/privacy}","received_events_url":"https://api.github.com/users/geraldhumphries/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-02T15:18:34Z","updated_at":"2015-12-05T14:32:16Z","closed_at":null,"body":"Hi, I have a feature request for a spec class that will run a join fetch (ex. like `@Query(\"select distinct entity from Entity entity left join fetch entity.contacts\")`) on a lazy loaded relationship. Using Specifications, there is no other way to emulate `join fetch` in `@Query`. I would rather the field be defined in the annotation as a constant, and it should not be required (or maybe not allowed) to pass it into the API.\r\n\r\nI have created a working mockup here: https://gist.github.com/geraldhumphries/9fba746a4613aae78ca4\r\n\r\nThat is a hack, however. I think an annotation like `@JoinFetch(field = \"lazyRelationship\", joinType = JoinType.LEFT)` would work better."},"comment":{"url":"https://api.github.com/repos/tkaczmarzyk/specification-arg-resolver/issues/comments/162195822","html_url":"https://github.com/tkaczmarzyk/specification-arg-resolver/issues/10#issuecomment-162195822","issue_url":"https://api.github.com/repos/tkaczmarzyk/specification-arg-resolver/issues/10","id":162195822,"user":{"login":"tkaczmarzyk","id":1536390,"avatar_url":"https://avatars.githubusercontent.com/u/1536390?v=3","gravatar_id":"","url":"https://api.github.com/users/tkaczmarzyk","html_url":"https://github.com/tkaczmarzyk","followers_url":"https://api.github.com/users/tkaczmarzyk/followers","following_url":"https://api.github.com/users/tkaczmarzyk/following{/other_user}","gists_url":"https://api.github.com/users/tkaczmarzyk/gists{/gist_id}","starred_url":"https://api.github.com/users/tkaczmarzyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkaczmarzyk/subscriptions","organizations_url":"https://api.github.com/users/tkaczmarzyk/orgs","repos_url":"https://api.github.com/users/tkaczmarzyk/repos","events_url":"https://api.github.com/users/tkaczmarzyk/events{/privacy}","received_events_url":"https://api.github.com/users/tkaczmarzyk/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T14:32:16Z","updated_at":"2015-12-05T14:32:16Z","body":"The idea and the spec impl looks great! As far as the annotation, I think the best way is to have a custom one (like `@JoinFetch` that you proposed). I'm on it!"}}