The goal is to update entries in a table. Conceptually I need...
public interface MessageRepository extends JpaRepository<Message, Long> {
@Modifying
@Transactional
@Query("update Message set isRead = true where receiver = id and isRead = false")
void markAllAsRead(Long id);
This compiles however when I run it It seems as though the transaction never commits. According to the documentation I need to flush the cache. This doesn't seem possible with my current setup with what Ive seen here because I do not have a function body. I'm trying to fix someone elses' code so I really don't want to refactor the entire thing.