So I have a entity Notification, that has a boolean attribute readStatus to determine of a notification has been read or not. When I click a button, I want to write a JPQL that retrieve the unread notifications (readStaus=false) and set the readStatus of those unread notifications to true
Note: I dont want to write jpql to retrieve the list and manually loop through the list to set the readStatus and merge them back to the database
Here is the solution