withWhereHas<TChild> method
whereHas and include of the same handle, so the loaded children
are the ones the filter named.
Implementation
S withWhereHas<TChild>(
MssqlRelation<TRow, TChild> Function(TFields fields) relation,
) {
final rel = relation(fields);
return include(
(_) => <MssqlRelation<TRow, Object?>>[rel.asInclude],
).whereHas((_) => rel);
}