How to use matchesQueery


I have two related classes. One is the user class and the other is a class where the user operation takes place. There are user endpoints in the class where the operation takes place. When I pull the transactions, I want the user data to come.

For this, I have tried querying for each user objectId before, but it is a very long process. How can I simply handle this? Can you help with how to do this with “query.matchesQuery”?

You need to create a relationship between the two classes. Once the relationship is added you can query user operation through relation.query() that gives you the user related data from the user operation class.

Check the below docs for examples:

Do I need to establish this relationship every time?

When you create a new row in user operation you need to link it to some user in the user class, before the save function.
So yeah, it needs to be done for every new row.