1
I wonder if there is soft delete functionality in Hibernate, because today I am doing in a way that I consider gambiarra, something to type:
@Entity
@Where(clause="ativo=1")
Controller:
Rejeicao rej = rejeicaoRepository.findOne(id);
if(rej != null){
rej.setAtivo(0);
rejeicaoRepository.save(rej);
}
If anyone has any better way to do it I’d appreciate it
Currently has no native, not completed versions
RELEASE
: Issue– Bruno César
I agree native does not even have, but does it have some less "gambit" to do ?
– Otto
I use a custom base repository, from there darlings specific to each case. In addition, I use some metadata in entities, such as to check whether it can actually be deleted (or not just logically), etc., but never used in controllers or services.
– Bruno César