any method

Expr<bool> any()

Builds a correlated SQL EXISTS expression for the filtered relationship.

The same related row must satisfy all where filters. Separate calls to any may match different rows. No related rows are loaded and no additional statements are executed.

Apply it before take or skip; paginated relationships are rejected with RELATION.AGGREGATE. Aggregate/window predicates report QUERY.AGGREGATE.

Implementation

Expr<bool> any() =>
    Expr.internal(RelationSubqueryNode(this, false), Codecs.boolean);