//此处必须加@Transactional,否则不能运行,报错

 
   @Transactional
    @Modifying
    @Query("update ExamItem a set a.version=0 where a.id=?1")
    int setFixedVersionFor(long id); 

 

相关文章: