标签: hibernate spring-data-jpa
对于软删除,我引入了一个列deleted。通过向实体添加@Where(clause = "deleted=false or deleted is null")来过滤掉相应的条目。但是,审核员也应获取删除的条目。如何在子句中添加参数并在EntityManager或EntityManagerFactory上设置属性?
deleted
@Where(clause = "deleted=false or deleted is null")
EntityManager
EntityManagerFactory