I have a meteor method that makes the following call:
Groups.update("thesamegroupId", {
$addToSet: {
contacts: {
name: 'somestring',
email: "anotherstring",
phone: "anotherstring",
_id: "anotherstring"
}
}
});
And will insert an empty object into the contacts array.
Using an identical query in the meteor mongo console however produces a different result.
db.groups.update("thesamegroupId", {
$addToSet: {
contacts: {
name: 'somestring',
email: "anotherstring",
phone: "anotherstring",
_id: "anotherstring"
}
}
});
Will correctly insert the described object onto the contacts array.
I’ve tried for two hours to google foo this, and have come up with nothing. Any help would be appreciated, do not hesitate to ask for more info if needed.