[hibernate-issues] [JIRA] (OGM-613) Implement locking, add tests for it