Hibernate restore soft-deleted entity

最后都变了- 提交于 2020-12-07 05:05:30

问题


I have an entity

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

Now when I delete some Entity it actually will set deleteFlag = 1 How can I restore the entity?

thanks

来源:https://stackoverflow.com/questions/24656518/hibernate-restore-soft-deleted-entity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!