How can I find contacts using the APIv4 that don't have any relationships of a specific type?
I want the first n contacts ordered by a date field meeting various conditions excluding those with a relationship of type X.
There are various ways it could be done with multiple calls or php looping but it would be nice to be able to do it in a single call.
In SQL one option using a subquery is:
SELECT * FROM Contacts WHERE <various things> AND contact_id NOT IN (SELECT contact_id_a FROM Relationships WHERE <conditions>) ORDER BY <something> LIMIT <n>
Can APIv4 produce something like that?