Page 1 of 1

While the mapping of a collection is happening, I need to invoke another query to count the number of registers from ano

Posted: Tue May 26, 2015 11:13 pm
by Leo7553799

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?


While the mapping of a collection is happening, I need to invoke another query to count the number of registers from ano

Posted: Wed May 27, 2015 7:37 am
by Serhii Kulibaba

Hello Leo,

You can execute any service via JS in the service mapping: https://getsatisfaction.com/apperyio/...