我写了一个命名查询
@NamedQuery(name = "deleteEmployee", query = "DELETE from emp e where e.Id = :Id", lockMode=LockModeType.PESSIMISTIC_WRITE)
但Eclipse链接会抛出以下错误 -
java.lang.IllegalArgumentException: A lock type can only be used with a select query (which allows the database to be locked where necessary)
然而,它适用于openJPA,我没有看到任何与上述异常相关的java文档。请建议。