{"action":"closed","issue":{"url":"https://api.github.com/repos/wayshall/dbm/issues/11","repository_url":"https://api.github.com/repos/wayshall/dbm","labels_url":"https://api.github.com/repos/wayshall/dbm/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/wayshall/dbm/issues/11/comments","events_url":"https://api.github.com/repos/wayshall/dbm/issues/11/events","html_url":"https://github.com/wayshall/dbm/issues/11","id":383228186,"node_id":"MDU6SXNzdWUzODMyMjgxODY=","number":11,"title":"mysql使用date类型做乐观锁版本时，因为精度问题，会导致非并发更新也会抛EntityVersionException","user":{"login":"wayshall","id":965315,"node_id":"MDQ6VXNlcjk2NTMxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/965315?v=4","gravatar_id":"","url":"https://api.github.com/users/wayshall","html_url":"https://github.com/wayshall","followers_url":"https://api.github.com/users/wayshall/followers","following_url":"https://api.github.com/users/wayshall/following{/other_user}","gists_url":"https://api.github.com/users/wayshall/gists{/gist_id}","starred_url":"https://api.github.com/users/wayshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayshall/subscriptions","organizations_url":"https://api.github.com/users/wayshall/orgs","repos_url":"https://api.github.com/users/wayshall/repos","events_url":"https://api.github.com/users/wayshall/events{/privacy}","received_events_url":"https://api.github.com/users/wayshall/received_events","type":"User","site_admin":false},"labels":[{"id":570743011,"node_id":"MDU6TGFiZWw1NzA3NDMwMTE=","url":"https://api.github.com/repos/wayshall/dbm/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":{"login":"wayshall","id":965315,"node_id":"MDQ6VXNlcjk2NTMxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/965315?v=4","gravatar_id":"","url":"https://api.github.com/users/wayshall","html_url":"https://github.com/wayshall","followers_url":"https://api.github.com/users/wayshall/followers","following_url":"https://api.github.com/users/wayshall/following{/other_user}","gists_url":"https://api.github.com/users/wayshall/gists{/gist_id}","starred_url":"https://api.github.com/users/wayshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayshall/subscriptions","organizations_url":"https://api.github.com/users/wayshall/orgs","repos_url":"https://api.github.com/users/wayshall/repos","events_url":"https://api.github.com/users/wayshall/events{/privacy}","received_events_url":"https://api.github.com/users/wayshall/received_events","type":"User","site_admin":false},"assignees":[{"login":"wayshall","id":965315,"node_id":"MDQ6VXNlcjk2NTMxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/965315?v=4","gravatar_id":"","url":"https://api.github.com/users/wayshall","html_url":"https://github.com/wayshall","followers_url":"https://api.github.com/users/wayshall/followers","following_url":"https://api.github.com/users/wayshall/following{/other_user}","gists_url":"https://api.github.com/users/wayshall/gists{/gist_id}","starred_url":"https://api.github.com/users/wayshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayshall/subscriptions","organizations_url":"https://api.github.com/users/wayshall/orgs","repos_url":"https://api.github.com/users/wayshall/repos","events_url":"https://api.github.com/users/wayshall/events{/privacy}","received_events_url":"https://api.github.com/users/wayshall/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/wayshall/dbm/milestones/1","html_url":"https://github.com/wayshall/dbm/milestone/1","labels_url":"https://api.github.com/repos/wayshall/dbm/milestones/1/labels","id":3882361,"node_id":"MDk6TWlsZXN0b25lMzg4MjM2MQ==","number":1,"title":"4.7.2","description":"","creator":{"login":"wayshall","id":965315,"node_id":"MDQ6VXNlcjk2NTMxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/965315?v=4","gravatar_id":"","url":"https://api.github.com/users/wayshall","html_url":"https://github.com/wayshall","followers_url":"https://api.github.com/users/wayshall/followers","following_url":"https://api.github.com/users/wayshall/following{/other_user}","gists_url":"https://api.github.com/users/wayshall/gists{/gist_id}","starred_url":"https://api.github.com/users/wayshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayshall/subscriptions","organizations_url":"https://api.github.com/users/wayshall/orgs","repos_url":"https://api.github.com/users/wayshall/repos","events_url":"https://api.github.com/users/wayshall/events{/privacy}","received_events_url":"https://api.github.com/users/wayshall/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":3,"state":"open","created_at":"2018-12-08T16:49:01Z","updated_at":"2018-12-08T16:53:59Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-11-21T17:40:02Z","updated_at":"2018-12-08T16:53:59Z","closed_at":"2018-12-08T16:53:59Z","author_association":"OWNER","body":"mysql使用date类型做乐观锁版本时，因为精度问题，会导致非并发更新也会抛EntityVersionException\r\n\r\n1、新建一个对象，使用Date类型作为版本控制字段；\r\n2、使用persist保存；\r\n3、不使用load方法重新获取，直接修改原对象后直接update，会抛出EntityVersionException，但实际上并没有并发修改数据；\r\n\r\n实际上因为mysql的问题，第二步时，Java实体对象和数据库的状态并不一致，前者比后者更精确，后者只能精确到秒。"}}
{"actor":{"display_login":"wayshall"}}