> `"filter_by": "$person_addresses(id:*)"` coo...
# community-help
h
"filter_by": "$person_addresses(id:*)"
cool! can you explain this?
Since
person_addresses
collection contains the reference field and you're searching
person_primary
collection, you cannot specify
person_addresses
directly in the
include_fields
to fetch the related documents(it works the other way around). So you'll need to join on the
person_addresses
collection.
id:*
is a special filter that matches all the documents of a particular collection so when used in a join, it allows you to list
person_addresses
in each
person_primary
documents if the address of the person is available.