{"action":"closed","issue":{"url":"https://api.github.com/repos/datanucleus/datanucleus-api-jpa/issues/101","repository_url":"https://api.github.com/repos/datanucleus/datanucleus-api-jpa","labels_url":"https://api.github.com/repos/datanucleus/datanucleus-api-jpa/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/datanucleus/datanucleus-api-jpa/issues/101/comments","events_url":"https://api.github.com/repos/datanucleus/datanucleus-api-jpa/issues/101/events","html_url":"https://github.com/datanucleus/datanucleus-api-jpa/issues/101","id":298227444,"number":101,"title":"updatable = false on an PK column breaks optimistic locking","user":{"login":"pandacalculus","id":965253,"avatar_url":"https://avatars1.githubusercontent.com/u/965253?v=4","gravatar_id":"","url":"https://api.github.com/users/pandacalculus","html_url":"https://github.com/pandacalculus","followers_url":"https://api.github.com/users/pandacalculus/followers","following_url":"https://api.github.com/users/pandacalculus/following{/other_user}","gists_url":"https://api.github.com/users/pandacalculus/gists{/gist_id}","starred_url":"https://api.github.com/users/pandacalculus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandacalculus/subscriptions","organizations_url":"https://api.github.com/users/pandacalculus/orgs","repos_url":"https://api.github.com/users/pandacalculus/repos","events_url":"https://api.github.com/users/pandacalculus/events{/privacy}","received_events_url":"https://api.github.com/users/pandacalculus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-19T10:34:45Z","updated_at":"2018-02-19T13:56:58Z","closed_at":"2018-02-19T13:56:57Z","author_association":"NONE","body":"## Bug Report \r\n\r\nfailing test case:\r\nhttps://github.com/pandacalculus/test-jpa\r\n\r\nsummary:\r\nadding `updatable = false` in a `@Column` annotation on a `@Id` (PK) field prevents its inclusion in the WHERE clause of update statements using optimistic locking. \r\n\r\nFor the test case referenced above, the expected UPDATE on commit should be:\r\n```\r\nUPDATE ENTITY SET _VERSION=<2> WHERE ID='1' AND _VERSION=<1>\r\n```\r\nbut actual generated UPDATE is:\r\n```\r\nUPDATE ENTITY SET _VERSION=<2> WHERE _VERSION=<1>\r\n```\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"andyjefferson"}}