📜  更新查询 jpa - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:19.463000             🧑  作者: Mango

代码示例1
@Modifying
@Transactional //helps with exception: Executing an update/delete query
@Query("update User u set u.active = false where u.lastLoginDate < :date")
void deactivateUsersNotLoggedInSince(@Param("date") LocalDate date);