I am using SimpleSchema with Meteor for Structuring the Database Entries.
The problem is, I have an array of arrays of objects (These data is displayed inside of an HTML table) and need to update single cells.
My Schema looks like: (Coffeescript)
drags:
type: [[Object]]
label: "The correct assignment of drop values"
optional: true
blackbox: true
"drags.$":
type: [Object]
label: "Row of the Table"
blackbox: true
"drags.$.$":
type: Object
label: "Cell of the Table"
"drags.$.$._id":
type: String
label: "Unique Id of Draggable"
optional: true
"drags.$.$.text":
type: String
label: "Text of Draggable"
optional: true
"drags.$.$.fixed":
type: Boolean
label: "Is this Draggable Fixed to the correct spot"
optional: true
"drags.$.$.color":
type: String
label: "Color of Draggable"
optional: true
My Database call to update a specific cell is:
db.update({_id:"some-id"},{$set: {"drags.1.2.fixed":true}})
This call throws this error:
Error: When the modifier option is true, validation object must have at least one operator