@Entity
@Table(name = "\"user\"")
@SoftDelete
public class UserEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
@Column(name = "is_deleted")
private Boolean deleted;
Query<UserEntity> query = s.createQuery("FROM UserEntity user WHERE user.deleted =true");
List<UserEntity> list=query.getResultList();
SQL:
Hibernate:
select
ue1_0.id,
ue1_0.is_deleted,
ue1_0.name
from
"user" ue1_0
where
ue1_0.is_deleted=true
and ue1_0.deleted=false