How to filter a collection by related Id which have relationship to another collection?

I was trying to filter a collection by a related Id which have relationship to another collection
When I try to filter with query ‘relatedId == 42’, it return error message Accessing object type A which has been invalidated or deleted.
The related id is defined as int in the schema, but when I log it, it shows that the related id is an object.

Hi Yap_Xia_Tan,

In order to help us help you, could you share with us what SDK you are using? That would allow us to provide you with some helpful examples. Additionally some snippets of your code would be beneficial for us to understand where you are having issues:

  • how you’ve defined the class of the collection
  • your exact query and maybe surrounding code
  • how you log the “related id”
  • anything else you think we should see

If any of the code has sensitive information, we can provide you with a link to securely upload the code so that it won’t be publically visible.

1 Like