Was following MongodB tutorial.
in lib/collections.js:
FutureTasks = new Meteor.Collection('future_tasks');
var Schemas = {};
Schemas.FutureTask = new SimpleSchema({
ticketnumber: {
type: String,
label: "TICKET_NUMBER",
max: 10,
index: true,
optional: true,
unique: true
},
in server/main.js:
for (var i = 0; i < recordsLength; i++) {
FutureTasks.save({
Exception in callback of async function: TypeError: Object [object Object] has no method ‘save’
But only works with ‘insert’, and hi-lighting ‘save’ shows multiple implementations, so why is ‘save’ is not recognized within MeteorJS environment?