I have following custom Query:
@Transactional
@Modifying
@Query(value = "UPDATE ARTICLE set likes = likes + 1 WHERE article_id = ?1", nativeQuery = true)
int likeArticleById(UUID uuid);
So this Method returns me the number of changed rows.
Is there any possiblity to get the updated value as return value?
In this example I am updating the number of likes and want back the updated number of likes.