@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);