Can I use a method name to create a Spring JPA update query?

Viewed 451

Using https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.query-methods.details as a reference, I see how I can write a method in a repository without using the @Query annotation, i.e. List<User> findByEmailAddressAndLastname(String emailAddress, String lastname);

However, is there a similar way to write an update query through a naming convention? i.e. void updateAllFirstNameByLastNameEqualTo(String lastname)

Spring Data JPA Update Method seems to suggest that there isn't.

0 Answers
Related