Suppose you have this in OnModelCreating
builder.HasQueryFilter(p => !p.deleted && !p.SectionHeader.deleted);
It seems the code for the related entity here is always ignored when the sql is generated. Seems like there should be a way to block this if it doesn't work.
Instead I get the following
WHERE NOT (s.deleted) AND s.section_header_id = @__sectionHeaderId_0"
if i try to search with the id of the deleted entity.
How would you always apply a query filter then to exclude a related entity if it is deleted?