{"action":"closed","issue":{"url":"https://api.github.com/repos/ebean-orm/avaje-ebeanorm/issues/535","labels_url":"https://api.github.com/repos/ebean-orm/avaje-ebeanorm/issues/535/labels{/name}","comments_url":"https://api.github.com/repos/ebean-orm/avaje-ebeanorm/issues/535/comments","events_url":"https://api.github.com/repos/ebean-orm/avaje-ebeanorm/issues/535/events","html_url":"https://github.com/ebean-orm/avaje-ebeanorm/issues/535","id":127865160,"number":535,"title":"Bean lazy loading can execute an extra query when one of the lazy loaded beans has been deleted ","user":{"login":"rbygrave","id":208973,"avatar_url":"https://avatars.githubusercontent.com/u/208973?v=3","gravatar_id":"","url":"https://api.github.com/users/rbygrave","html_url":"https://github.com/rbygrave","followers_url":"https://api.github.com/users/rbygrave/followers","following_url":"https://api.github.com/users/rbygrave/following{/other_user}","gists_url":"https://api.github.com/users/rbygrave/gists{/gist_id}","starred_url":"https://api.github.com/users/rbygrave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbygrave/subscriptions","organizations_url":"https://api.github.com/users/rbygrave/orgs","repos_url":"https://api.github.com/users/rbygrave/repos","events_url":"https://api.github.com/users/rbygrave/events{/privacy}","received_events_url":"https://api.github.com/users/rbygrave/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ebean-orm/avaje-ebeanorm/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"rbygrave","id":208973,"avatar_url":"https://avatars.githubusercontent.com/u/208973?v=3","gravatar_id":"","url":"https://api.github.com/users/rbygrave","html_url":"https://github.com/rbygrave","followers_url":"https://api.github.com/users/rbygrave/followers","following_url":"https://api.github.com/users/rbygrave/following{/other_user}","gists_url":"https://api.github.com/users/rbygrave/gists{/gist_id}","starred_url":"https://api.github.com/users/rbygrave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbygrave/subscriptions","organizations_url":"https://api.github.com/users/rbygrave/orgs","repos_url":"https://api.github.com/users/rbygrave/repos","events_url":"https://api.github.com/users/rbygrave/events{/privacy}","received_events_url":"https://api.github.com/users/rbygrave/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ebean-orm/avaje-ebeanorm/milestones/72","html_url":"https://github.com/ebean-orm/avaje-ebeanorm/milestones/6.16.2","labels_url":"https://api.github.com/repos/ebean-orm/avaje-ebeanorm/milestones/72/labels","id":1530513,"number":72,"title":"6.16.2","description":null,"creator":{"login":"rbygrave","id":208973,"avatar_url":"https://avatars.githubusercontent.com/u/208973?v=3","gravatar_id":"","url":"https://api.github.com/users/rbygrave","html_url":"https://github.com/rbygrave","followers_url":"https://api.github.com/users/rbygrave/followers","following_url":"https://api.github.com/users/rbygrave/following{/other_user}","gists_url":"https://api.github.com/users/rbygrave/gists{/gist_id}","starred_url":"https://api.github.com/users/rbygrave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbygrave/subscriptions","organizations_url":"https://api.github.com/users/rbygrave/orgs","repos_url":"https://api.github.com/users/rbygrave/repos","events_url":"https://api.github.com/users/rbygrave/events{/privacy}","received_events_url":"https://api.github.com/users/rbygrave/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2016-01-21T07:52:14Z","updated_at":"2016-01-21T07:52:17Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-01-21T07:47:06Z","updated_at":"2016-01-21T07:52:17Z","closed_at":"2016-01-21T07:52:17Z","body":"So in batch lazy loading of beans, if a bean has actually been deleted it will have a 'lazyLoadFailed' flag set and throw a EntityNotFoundException when accessed. If the bean is not the first bean in the batch then the exception is still thrown but an extra sql query is executed (and that extra query should not really execute).\r\n\r\nThis bug fix stops that extra query from being executed."}}