Did we lose Mongo.Collection.get()
in one of the recent releases?
Can’t find any hint of it in Meteor code back to 1.2.1.
Maybe it was from an atmosphere package?
1 Like
Huh. Well, I’ve been using Meteor since v0.5, so maybe that function has just been sitting in the codebase unused that long.
Slept on the issue, and figured out a workaround for my problem. If anybody wants an easy function to clear all the data cursors on the client, and know the cursor names:
function clearAllDataCursors(){
console.log('Clear all data cursors!');
if(confirm("Are you sure?")){
let collectionNames = [
'Immunizations',
'Organizations',
'Observations',
'Patients'
];
resourceTypes.forEach(function(collectionNames){
if(Meteor.isClient){
if(window[resourceType]){
window[resourceType].remove({})
}
}
})
}
}
The major problem with this approach is that you need to know the cursor names before hand. I’d be curious if anybody has an approach to get a list of all the Cursors registered on the client though, so we can support dynamic registration.