Method WhereHasAncestor<TTarget>(Expression<Func<TTarget, bool>>, int?)

Assembly: redb.Core.dll

Filter by ancestors: find objects that have an ancestor of specified type matching condition.
Uses SQL operator $hasAncestor.
Supports polymorphic trees - can search for ancestors of different type.

public virtual IRedbQueryable<TProps> WhereHasAncestor<TTarget>(Expression<Func<TTarget, bool>> ancestorCondition, int? maxDepth = null) where TTarget : class