I'm using PostgreSQL and Spring data JPA to execut...
# spring
r
I'm using PostgreSQL and Spring data JPA to execute update as following
Copy code
@Transactional
@Modifying(flushAutomatically = true, clearAutomatically = true)
@Query(
     "UPDATE posts SET comments_count = comments_count +1 WHERE post_id = :postId RETURNING comments_count",
      nativeQuery = true
)
fun incrementCommentCounter(@Param("postId") postId: Long): Int
As i'm using native query with 
RETURNING
 clause, it throws exception as
Copy code
o.h.engine.jdbc.spi.SqlExceptionHelper   : A result was returned when none was expected.
How should i execute this query with spring boot?
😶 1
i
have you override jpa?
r
@iamkdblue what do you mean by override jpa?