Hibernate恢复软删除的实体

时间:2014-07-09 14:31:45

标签: java hibernate soft-delete

我有一个实体

@Entity
@Table(name = "[Usermaster]")
@SQLDelete(sql = "UPDATE Usermaster SET isDeleted = 1")
@Where(clause = "isDeleted = 0")
public class User {
//...
}

现在当我删除一些实体时,它实际上会设置deleteFlag = 1 我该如何恢复实体?

感谢

0 个答案:

没有答案