I'm creating a facebook like user post database for my app in Firestore. this is structure
Posts(Collection)
(documents)----(data)
-----post_uid1-{ userId: userId1 content: "content1XYZ"}
-----post_uid1-{ userId: userId2 content: "content2XYZ"}
and so on.
I want to perform a query to get posts for a user's all friend.
In SQL I could perfom a SELECT * FROM posts where id in (friendsIds)
.
In Firestore we have(for JAVA) ref.whereEqualTo("key","value")
but if a user has let's say 100 friends how will I perform this query?
I know we can chain multiple whereEqualTo
conditions. but for 100s of values it doesn't seem convenient.