Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

update query jpa

@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);
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #update #query #jpa
ADD COMMENT
Topic
Name
2+8 =