@Modifying(clearAutomatically = true)
@Query("update User a set a.status =:status where a.id =:id")
public void update(@Param("status") int status,@Param("id")Long id);
Spring Data JPA更新操作
最新推荐文章于 2024-04-30 14:39:37 发布
@Modifying(clearAutomatically = true)
@Query("update User a set a.status =:status where a.id =:id")
public void update(@Param("status") int status,@Param("id")Long id);