I have a collection called “activities” the activity in each collection needs to be assign automaticaly to collection “listings, contacts and requests” like so based on an array of ids.
if I have an activiy or more that containts the fields “listingsIds: [1, 10, 90, 3]”, “contactsIds: [c1, c9]” , “requestsIds: [req2, re3, req9]” the documents with the corresponding ids need to be updated in each collection with an array field like so “activitiesId: [a1]” in wichi later I’ll more activities. How can I achieve that?
what I’ve done so far, but I’m not sure it’s okay is this.
