How to aggregate relation?

I’m planning to use relations as type of my field and I’d like to know how to query the relations using aggregate? Thanks.

Can you share your schema and what query you need to do?

Yeah, about that, at first I tried to resort aggregate relation, because I have this Receipt class where it holds related PurchaseItem and I want to aggregate for reporting. I actually changed the structure of my schema and did some thinking. Now, since relation field is made up of three class, where one class is for bridging the id of the two classes, I just can’t find a way to do aggregation or if it’s possible.

It’s probably possible. Did you use pointers in the bridge class? Can you share an example of query that you need to perform?

I’m still not actually there, that’s why I’m just thinking if it’s possible. The bridge class was made by Parse (_Join:_User:Role something like this?).

You will probably be able to achieve your needs using aggregate and/or relational queries. Try to write a simple POC and let me know if you need any help.

1 Like