[hibernate-issues] [JIRA] (HHH-13659) EntityManager#lock throws throws OptimisticLockException using LockModeType.PESSIMISTIC_WRITE if entity doesn't exist in dataase