{"action":"opened","issue":{"url":"https://api.github.com/repos/spring-projects/spring-data-neo4j/issues/237","labels_url":"https://api.github.com/repos/spring-projects/spring-data-neo4j/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-data-neo4j/issues/237/comments","events_url":"https://api.github.com/repos/spring-projects/spring-data-neo4j/issues/237/events","html_url":"https://github.com/spring-projects/spring-data-neo4j/issues/237","id":61153587,"number":237,"title":"Optimistic Locking","user":{"login":"vince-bickers","id":1481408,"avatar_url":"https://avatars.githubusercontent.com/u/1481408?v=3","gravatar_id":"","url":"https://api.github.com/users/vince-bickers","html_url":"https://github.com/vince-bickers","followers_url":"https://api.github.com/users/vince-bickers/followers","following_url":"https://api.github.com/users/vince-bickers/following{/other_user}","gists_url":"https://api.github.com/users/vince-bickers/gists{/gist_id}","starred_url":"https://api.github.com/users/vince-bickers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vince-bickers/subscriptions","organizations_url":"https://api.github.com/users/vince-bickers/orgs","repos_url":"https://api.github.com/users/vince-bickers/repos","events_url":"https://api.github.com/users/vince-bickers/events{/privacy}","received_events_url":"https://api.github.com/users/vince-bickers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-data-neo4j/labels/4.0","name":"4.0","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-13T17:38:45Z","updated_at":"2015-03-13T17:38:45Z","closed_at":null,"body":"We need to support @Version for Node and Relationship-backed entities\r\n\r\nWe'll use Long ids and persist them in the database.\r\n\r\nLoading: Object with @Version attribute will have their version attribute set automatically by the mapper from the node or relationship property. There is no need to do anything \"magic\" here.\r\n\r\nSaving: Objects with @Version attribute set will have an additional WHERE clause added to the Cypher query, which checks the version. Additionally, we will need to know whether the update was successful, so we need to return something (e.g. the version of the current object?)."}}