I would like to update multiple rows of a table using Case clause in the update query.
I have an Map<String, String> which contains values of 2 columns. Key acts as the identifier of the row and the value in the map is the value of the column I want to update.
How can I do this in a spring data JPA @Query?
I would like to achieve something like
@Modifying
@Query("update RequestDetail rd set value = VALUE(:statusDetails) where name='Status' and RequestUuid=KEY(:statusDetails)")
void updateBulkStatus(Map<String, String> statusDetails);
But this is giving the exception - antlr.SemanticException: node did not reference a map.
Goal is to avoid multiple update queries to DB.
What better ways we have to update multiple rows with multiple values to a single column.