{"action":"closed","number":873,"pull_request":{"url":"https://api.github.com/repos/ebean-orm/ebean/pulls/873","id":92867588,"html_url":"https://github.com/ebean-orm/ebean/pull/873","diff_url":"https://github.com/ebean-orm/ebean/pull/873.diff","patch_url":"https://github.com/ebean-orm/ebean/pull/873.patch","issue_url":"https://api.github.com/repos/ebean-orm/ebean/issues/873","number":873,"state":"closed","locked":false,"title":"Batching exception safety","user":{"login":"ksperling","id":794414,"avatar_url":"https://avatars.githubusercontent.com/u/794414?v=3","gravatar_id":"","url":"https://api.github.com/users/ksperling","html_url":"https://github.com/ksperling","followers_url":"https://api.github.com/users/ksperling/followers","following_url":"https://api.github.com/users/ksperling/following{/other_user}","gists_url":"https://api.github.com/users/ksperling/gists{/gist_id}","starred_url":"https://api.github.com/users/ksperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksperling/subscriptions","organizations_url":"https://api.github.com/users/ksperling/orgs","repos_url":"https://api.github.com/users/ksperling/repos","events_url":"https://api.github.com/users/ksperling/events{/privacy}","received_events_url":"https://api.github.com/users/ksperling/received_events","type":"User","site_admin":false},"body":"This adds some tests for exception safety around batchOnCascade handling, plus a second commit with my attempt at fixing the issue.\r\n\r\nThe `testBatchScenarioWithSavepoint` is the scenario motivating this for me: I've got code in a few places where I use a save point to make an insert or update that may fail due to a constraint violation. If it does fail, I want to be able to roll  back to the save point and take a different course of action (e.g. update an existing record instead of creating a new one etc). This kind of code broke after upgrading from ebean 7.5 to 8, because the batch and batch mode do not get correctly reset when an operation fails.\r\n\r\nAdditional tests and changes might be required when working with batching enabled at the top level, I haven't tested.","created_at":"2016-11-08T21:59:26Z","updated_at":"2016-11-11T04:06:29Z","closed_at":"2016-11-11T04:06:29Z","merged_at":"2016-11-11T04:06:29Z","merge_commit_sha":"74626184b28d9e52a1c8fb44fe98355869d36e9e","assignee":{"login":"ksperling","id":794414,"avatar_url":"https://avatars.githubusercontent.com/u/794414?v=3","gravatar_id":"","url":"https://api.github.com/users/ksperling","html_url":"https://github.com/ksperling","followers_url":"https://api.github.com/users/ksperling/followers","following_url":"https://api.github.com/users/ksperling/following{/other_user}","gists_url":"https://api.github.com/users/ksperling/gists{/gist_id}","starred_url":"https://api.github.com/users/ksperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksperling/subscriptions","organizations_url":"https://api.github.com/users/ksperling/orgs","repos_url":"https://api.github.com/users/ksperling/repos","events_url":"https://api.github.com/users/ksperling/events{/privacy}","received_events_url":"https://api.github.com/users/ksperling/received_events","type":"User","site_admin":false},"assignees":[{"login":"ksperling","id":794414,"avatar_url":"https://avatars.githubusercontent.com/u/794414?v=3","gravatar_id":"","url":"https://api.github.com/users/ksperling","html_url":"https://github.com/ksperling","followers_url":"https://api.github.com/users/ksperling/followers","following_url":"https://api.github.com/users/ksperling/following{/other_user}","gists_url":"https://api.github.com/users/ksperling/gists{/gist_id}","starred_url":"https://api.github.com/users/ksperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksperling/subscriptions","organizations_url":"https://api.github.com/users/ksperling/orgs","repos_url":"https://api.github.com/users/ksperling/repos","events_url":"https://api.github.com/users/ksperling/events{/privacy}","received_events_url":"https://api.github.com/users/ksperling/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ebean-orm/ebean/milestones/122","html_url":"https://github.com/ebean-orm/ebean/milestones/9.1.2","labels_url":"https://api.github.com/repos/ebean-orm/ebean/milestones/122/labels","id":2121496,"number":122,"title":"9.1.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":2,"state":"open","created_at":"2016-11-08T10:42:38Z","updated_at":"2016-11-11T04:06:29Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/ebean-orm/ebean/pulls/873/commits","review_comments_url":"https://api.github.com/repos/ebean-orm/ebean/pulls/873/comments","review_comment_url":"https://api.github.com/repos/ebean-orm/ebean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ebean-orm/ebean/issues/873/comments","statuses_url":"https://api.github.com/repos/ebean-orm/ebean/statuses/8661e1fd3f17ed46aeceac80923b969e55bf630d","head":{"label":"ksperling:batching-exception-safety","ref":"batching-exception-safety","sha":"8661e1fd3f17ed46aeceac80923b969e55bf630d","user":{"login":"ksperling","id":794414,"avatar_url":"https://avatars.githubusercontent.com/u/794414?v=3","gravatar_id":"","url":"https://api.github.com/users/ksperling","html_url":"https://github.com/ksperling","followers_url":"https://api.github.com/users/ksperling/followers","following_url":"https://api.github.com/users/ksperling/following{/other_user}","gists_url":"https://api.github.com/users/ksperling/gists{/gist_id}","starred_url":"https://api.github.com/users/ksperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksperling/subscriptions","organizations_url":"https://api.github.com/users/ksperling/orgs","repos_url":"https://api.github.com/users/ksperling/repos","events_url":"https://api.github.com/users/ksperling/events{/privacy}","received_events_url":"https://api.github.com/users/ksperling/received_events","type":"User","site_admin":false},"repo":{"id":73229690,"name":"ebean","full_name":"ksperling/ebean","owner":{"login":"ksperling","id":794414,"avatar_url":"https://avatars.githubusercontent.com/u/794414?v=3","gravatar_id":"","url":"https://api.github.com/users/ksperling","html_url":"https://github.com/ksperling","followers_url":"https://api.github.com/users/ksperling/followers","following_url":"https://api.github.com/users/ksperling/following{/other_user}","gists_url":"https://api.github.com/users/ksperling/gists{/gist_id}","starred_url":"https://api.github.com/users/ksperling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksperling/subscriptions","organizations_url":"https://api.github.com/users/ksperling/orgs","repos_url":"https://api.github.com/users/ksperling/repos","events_url":"https://api.github.com/users/ksperling/events{/privacy}","received_events_url":"https://api.github.com/users/ksperling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ksperling/ebean","description":"EbeanORM API and implementation","fork":true,"url":"https://api.github.com/repos/ksperling/ebean","forks_url":"https://api.github.com/repos/ksperling/ebean/forks","keys_url":"https://api.github.com/repos/ksperling/ebean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ksperling/ebean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ksperling/ebean/teams","hooks_url":"https://api.github.com/repos/ksperling/ebean/hooks","issue_events_url":"https://api.github.com/repos/ksperling/ebean/issues/events{/number}","events_url":"https://api.github.com/repos/ksperling/ebean/events","assignees_url":"https://api.github.com/repos/ksperling/ebean/assignees{/user}","branches_url":"https://api.github.com/repos/ksperling/ebean/branches{/branch}","tags_url":"https://api.github.com/repos/ksperling/ebean/tags","blobs_url":"https://api.github.com/repos/ksperling/ebean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ksperling/ebean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ksperling/ebean/git/refs{/sha}","trees_url":"https://api.github.com/repos/ksperling/ebean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ksperling/ebean/statuses/{sha}","languages_url":"https://api.github.com/repos/ksperling/ebean/languages","stargazers_url":"https://api.github.com/repos/ksperling/ebean/stargazers","contributors_url":"https://api.github.com/repos/ksperling/ebean/contributors","subscribers_url":"https://api.github.com/repos/ksperling/ebean/subscribers","subscription_url":"https://api.github.com/repos/ksperling/ebean/subscription","commits_url":"https://api.github.com/repos/ksperling/ebean/commits{/sha}","git_commits_url":"https://api.github.com/repos/ksperling/ebean/git/commits{/sha}","comments_url":"https://api.github.com/repos/ksperling/ebean/comments{/number}","issue_comment_url":"https://api.github.com/repos/ksperling/ebean/issues/comments{/number}","contents_url":"https://api.github.com/repos/ksperling/ebean/contents/{+path}","compare_url":"https://api.github.com/repos/ksperling/ebean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ksperling/ebean/merges","archive_url":"https://api.github.com/repos/ksperling/ebean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ksperling/ebean/downloads","issues_url":"https://api.github.com/repos/ksperling/ebean/issues{/number}","pulls_url":"https://api.github.com/repos/ksperling/ebean/pulls{/number}","milestones_url":"https://api.github.com/repos/ksperling/ebean/milestones{/number}","notifications_url":"https://api.github.com/repos/ksperling/ebean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ksperling/ebean/labels{/name}","releases_url":"https://api.github.com/repos/ksperling/ebean/releases{/id}","deployments_url":"https://api.github.com/repos/ksperling/ebean/deployments","created_at":"2016-11-08T21:43:23Z","updated_at":"2016-11-08T21:43:28Z","pushed_at":"2016-11-08T21:59:09Z","git_url":"git://github.com/ksperling/ebean.git","ssh_url":"git@github.com:ksperling/ebean.git","clone_url":"https://github.com/ksperling/ebean.git","svn_url":"https://github.com/ksperling/ebean","homepage":"https://ebean-orm.github.io/","size":11689,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ebean-orm:master","ref":"master","sha":"3eb9bc1d163a9a39966c351fcf5dc5cd03135489","user":{"login":"ebean-orm","id":3973790,"avatar_url":"https://avatars.githubusercontent.com/u/3973790?v=3","gravatar_id":"","url":"https://api.github.com/users/ebean-orm","html_url":"https://github.com/ebean-orm","followers_url":"https://api.github.com/users/ebean-orm/followers","following_url":"https://api.github.com/users/ebean-orm/following{/other_user}","gists_url":"https://api.github.com/users/ebean-orm/gists{/gist_id}","starred_url":"https://api.github.com/users/ebean-orm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebean-orm/subscriptions","organizations_url":"https://api.github.com/users/ebean-orm/orgs","repos_url":"https://api.github.com/users/ebean-orm/repos","events_url":"https://api.github.com/users/ebean-orm/events{/privacy}","received_events_url":"https://api.github.com/users/ebean-orm/received_events","type":"Organization","site_admin":false},"repo":{"id":5793895,"name":"ebean","full_name":"ebean-orm/ebean","owner":{"login":"ebean-orm","id":3973790,"avatar_url":"https://avatars.githubusercontent.com/u/3973790?v=3","gravatar_id":"","url":"https://api.github.com/users/ebean-orm","html_url":"https://github.com/ebean-orm","followers_url":"https://api.github.com/users/ebean-orm/followers","following_url":"https://api.github.com/users/ebean-orm/following{/other_user}","gists_url":"https://api.github.com/users/ebean-orm/gists{/gist_id}","starred_url":"https://api.github.com/users/ebean-orm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebean-orm/subscriptions","organizations_url":"https://api.github.com/users/ebean-orm/orgs","repos_url":"https://api.github.com/users/ebean-orm/repos","events_url":"https://api.github.com/users/ebean-orm/events{/privacy}","received_events_url":"https://api.github.com/users/ebean-orm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ebean-orm/ebean","description":"EbeanORM API and implementation","fork":false,"url":"https://api.github.com/repos/ebean-orm/ebean","forks_url":"https://api.github.com/repos/ebean-orm/ebean/forks","keys_url":"https://api.github.com/repos/ebean-orm/ebean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ebean-orm/ebean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ebean-orm/ebean/teams","hooks_url":"https://api.github.com/repos/ebean-orm/ebean/hooks","issue_events_url":"https://api.github.com/repos/ebean-orm/ebean/issues/events{/number}","events_url":"https://api.github.com/repos/ebean-orm/ebean/events","assignees_url":"https://api.github.com/repos/ebean-orm/ebean/assignees{/user}","branches_url":"https://api.github.com/repos/ebean-orm/ebean/branches{/branch}","tags_url":"https://api.github.com/repos/ebean-orm/ebean/tags","blobs_url":"https://api.github.com/repos/ebean-orm/ebean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ebean-orm/ebean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ebean-orm/ebean/git/refs{/sha}","trees_url":"https://api.github.com/repos/ebean-orm/ebean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ebean-orm/ebean/statuses/{sha}","languages_url":"https://api.github.com/repos/ebean-orm/ebean/languages","stargazers_url":"https://api.github.com/repos/ebean-orm/ebean/stargazers","contributors_url":"https://api.github.com/repos/ebean-orm/ebean/contributors","subscribers_url":"https://api.github.com/repos/ebean-orm/ebean/subscribers","subscription_url":"https://api.github.com/repos/ebean-orm/ebean/subscription","commits_url":"https://api.github.com/repos/ebean-orm/ebean/commits{/sha}","git_commits_url":"https://api.github.com/repos/ebean-orm/ebean/git/commits{/sha}","comments_url":"https://api.github.com/repos/ebean-orm/ebean/comments{/number}","issue_comment_url":"https://api.github.com/repos/ebean-orm/ebean/issues/comments{/number}","contents_url":"https://api.github.com/repos/ebean-orm/ebean/contents/{+path}","compare_url":"https://api.github.com/repos/ebean-orm/ebean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ebean-orm/ebean/merges","archive_url":"https://api.github.com/repos/ebean-orm/ebean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ebean-orm/ebean/downloads","issues_url":"https://api.github.com/repos/ebean-orm/ebean/issues{/number}","pulls_url":"https://api.github.com/repos/ebean-orm/ebean/pulls{/number}","milestones_url":"https://api.github.com/repos/ebean-orm/ebean/milestones{/number}","notifications_url":"https://api.github.com/repos/ebean-orm/ebean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ebean-orm/ebean/labels{/name}","releases_url":"https://api.github.com/repos/ebean-orm/ebean/releases{/id}","deployments_url":"https://api.github.com/repos/ebean-orm/ebean/deployments","created_at":"2012-09-13T11:49:56Z","updated_at":"2016-11-10T16:00:42Z","pushed_at":"2016-11-11T04:06:29Z","git_url":"git://github.com/ebean-orm/ebean.git","ssh_url":"git@github.com:ebean-orm/ebean.git","clone_url":"https://github.com/ebean-orm/ebean.git","svn_url":"https://github.com/ebean-orm/ebean","homepage":"https://ebean-orm.github.io/","size":12652,"stargazers_count":390,"watchers_count":390,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":135,"mirror_url":null,"open_issues_count":23,"forks":135,"open_issues":23,"watchers":390,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ebean-orm/ebean/pulls/873"},"html":{"href":"https://github.com/ebean-orm/ebean/pull/873"},"issue":{"href":"https://api.github.com/repos/ebean-orm/ebean/issues/873"},"comments":{"href":"https://api.github.com/repos/ebean-orm/ebean/issues/873/comments"},"review_comments":{"href":"https://api.github.com/repos/ebean-orm/ebean/pulls/873/comments"},"review_comment":{"href":"https://api.github.com/repos/ebean-orm/ebean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ebean-orm/ebean/pulls/873/commits"},"statuses":{"href":"https://api.github.com/repos/ebean-orm/ebean/statuses/8661e1fd3f17ed46aeceac80923b969e55bf630d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"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},"comments":1,"review_comments":0,"commits":2,"additions":173,"deletions":23,"changed_files":7}}
{"actor":{"display_login":"rbygrave"}}