I have an application that has products, each product can have multiple brands and categories, we want in the future to know how many products are in some category or brand. To do this we thought it best to keep the _ids of categories and brands within the product, but if we do this every time we see one or more products we have to publish the brands and categories just to know the names. The simplest solution would save names and not _ids, but would no longer be reactive and our reports would not be 100% accurate
for now our top picks are
- save _ids and publish the names of categories and brands when we want to see the products
- save the names and if at some point the name of a category or brand changes save the old name and index all names
¿What should I do?
Thank you very much, I appreciate your attention, Greetings from Colombia.