| The behavior you observed is the intent of the @Where clause. One alternative is to use a Hibernate @Filter and @FilterDef annotations instead. But doing this would mean your persistence/query/business logic would need to toggle on the filter right before a direct query of CatTurnos entities and toggle it off afterward. This way you won't get soft-deleted entities returned when directly querying them but you would when a relation points to a soft-deleted instance. A slightly different but extremely similar approach would be that in your persistence/query logic you would manually add the soft-delete predicate when you query for the entities. |