Spring Data: “delete by” is supported?

后端 未结 9 2275
长情又很酷
长情又很酷 2020-11-28 20:57

I am using Spring JPA for database access. I am able to find examples such as findByName and countByName, for which I dont have to write any method implementation. I am hopi

9条回答
  •  误落风尘
    2020-11-28 21:34

    @Query(value = "delete from addresses u where u.ADDRESS_ID LIKE %:addressId%", nativeQuery = true)
    void deleteAddressByAddressId(@Param("addressId") String addressId);
    

提交回复
热议问题