This is my firebase database structure in the image :
I'll explain the structure aswell, I have a forum, which people can post trades in. Every post has some random user key as you can see in the picture. Also every post has a list of items which the user wants to sell or buy ('have' or 'want', in the image). the number of items in each trade can change from 1 to 10.
I want to fetch all of the forum posts of the users that are selling ( or buying ) with some item id.
For example : Get forum posts of users selling items with 'Id' of 'Some Item Name'
How do I do this? I can't seem to get reference to each item in the inventory since you can't do multiple orderByChild. If you think it's impossible with this DB structure, Please offer me an alternative. I want to know whether I'm wasting my time with firebase and this is impossible to do :(
Please note that I have a lot of data in my DB so I can't just filter the posts on the client side.