Queries of the form "rows where the user participates in any role" fall back to raw SQL:
WHERE parcel_id = $1 AND (requester_id = $2 OR subject_id = $2)
WHERE sender_id = $1 OR recipient_id = $1 OR courier_id = $1
Proposal — an entity-level scope declaration:
#[scope(involving: requester_id | subject_id)]
Generated: list_involving(value, limit, offset) plus a variant with additional equality filters (list_involving_where), OR-ing the declared columns against one bound value. Covers the participant-listing pattern without a general query DSL.
Queries of the form "rows where the user participates in any role" fall back to raw SQL:
Proposal — an entity-level scope declaration:
#[scope(involving: requester_id | subject_id)]Generated:
list_involving(value, limit, offset)plus a variant with additional equality filters (list_involving_where), OR-ing the declared columns against one bound value. Covers the participant-listing pattern without a general query DSL.