I would like to know if there is a soft delete functionality in Hibernate, since today I'm doing something that I consider to be a gambiarra, something like:
@Entity
@Where(clause="ativo=1")
Controller:
Rejeicao rej = rejeicaoRepository.findOne(id);
if(rej != null){
rej.setAtivo(0);
rejeicaoRepository.save(rej);
}
If someone has a better way to do it, I'd appreciate it.