Package su.onno.repository
Annotation Interface IncludesDeleted
Marks a repository finder as intentionally returning rows that are marked for deletion
(soft-deleted), opting it out of the deletion-aware finder check (
onno.repository.deletion-check).
Catalogs and documents are soft-deleted: "delete" sets deletionMark = true and the row
stays in the table. Most business-logic finders must exclude those rows — use
CatalogRepository.findAllActive() / the findActiveBy* variants, or a derived
...AndDeletionMarkFalse query. A few finders legitimately need the tombstones: resolving a
Ref<T> to a deleted target, or a restore/admin screen. Annotate those with
@IncludesDeleted to declare the intent and silence the check.
public interface OrderRepository extends DocumentRepository<Order> {
// Upsert key for re-imports must see a previously deleted order, so admit tombstones:
@IncludesDeleted
Optional<Order> findByExternalNumber(String externalNumber);
}