I am using SimpleSchema and Collection2 from aldeed. I was wondering is there a way in Meteor or any of these packages to create a unique pairing? I want to create a record where the sender_user_id and receiver_user_id are unique in the collection, there will always only be one record with the same combo in the database. Is there a way to enforce this in mongo?
I am aware you can use “upsert” to get something like this but this is not what i am looking for.