I have posts in a timeline. Posts can be public (for every user) or for specific groups.
The post has a column “groups” which holds the array of the groups. and a boolean “public”.
When public is true, the groups are an empty array.
when groups are set, public is false.
When I fetch the posts, I wrote a beforeFind Hook in the cloud code.
I clone the incoming query (which has some other flags like “isPinned”) and to one query I add the constrain to the groups (so users only get the posts from his group) on the second query I add the constrain for public = true.
I chain them with Parse.Query.or but I get empty results.
So goal is, that I get all public posts and all posts for the groups. Each query for themselves are working. But chaining them with the or doesn’t work.
Can you help? Is the Parse.Query.or working different?
Yeah we tried this. But in the group array we have pointers. And somehow this throws and error.
We store pointers for easier access and less queries in the fronend.