Hi!
I'd like to list all items from a products_collection and count how many likes an item has. Example bellow.
DATABASE ===============================
*******products_collection
_id
_item
_detail
********users_collection
_id
_name
_email
********like_collection
_id
_products_id (pointer to products)
_users_id (pointer users)
Products Page List =========================
_item
_detail
likes (count like_collection.id where like_collection.products_id = products_collection.id
more specific: while the mapping is happening, I need to invoke another query to count the number of likes of each item has and show in the page.
How can I develop this code?