How would one find the Collection from the Document object in MongoDB? I'm developing a small game in Meteor and I've run into a scenario in which I have two Document objects that are similar (Players and Monsters) and get called often in similar places (both move, initiate combat, can pick things up, etc).
This is all server side code.
I have functions server side that can interchangeably use these Documents and I won't know which Collection to execute updates against.
I was hoping that there was a sort of "save()" method similar to that of Mongoose but there doesn't appear to be.
Is there a way to introspect a record after executing:
var player = Players.findOne({query});
to know that the results from that query are from Players to be inserted back into later in another function?