I need help with something.
I have 2 collections on my project, one is called products and another called stores.
One product can belong to many stores, so to make the app more “performatic”, I’m duplicating the selected product information into a sub-collection of stores, in this case stores > products.
My idea is to create a cloud-function that will watch for any updates on any product and then reflect those changes on the stores > products sub-collection by updating the values.
I’m already saving it with the same ID. So for example, the productID 1 under the products
collection will have the same id under the stores > products sub-collection.
My question is, how can I query only the products sub-collection? Is this possible?