Last active
June 30, 2022 13:26
-
-
Save atesibrahim/342732aa1dbda13811dced1ba13709cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Repository | |
public interface ProductRepository extends JpaRepository<Product, Integer> { | |
@Transactional | |
@Modifying | |
@Query(value = "update product " + | |
"set name = :name " + | |
"where id = :productId", nativeQuery = true) | |
void updateName(@Param("productId") Integer productId, @Param("name") String name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment