Not sure if my doubt is directly related with this, maybe it goes in other direction but I just found some info and I’d like to clarify some points.
I have to add another field in my Food collection for each plate:
rating: {
votes: [],
score: 0
},
I need to add the Meteor.userId() in the array but as index:
rating.votes['CAdsAcvaSADd'] = 3
I have no idea how to do this with Mongo. That’s why I thought that I’d need to define some schemas to say I want votes: [String]
. (LINK)
- Would I need to specify this in the schema then?
- In terms of best practiques is this a better solution/way?
My app is also AngularJS with TypeScript.
Thanks in advance