Open nosizejosh opened 6 years ago
changed schema to below but still no errors and no inserts either.
tenants: { // all organaisations a user has access to
type: Array, //Object,
optional: true,
blackbox: true
},
"tenants.$": { // all organaisations a user has access to type: Object }, "tenants.$.id": { // the organisation is type: String, }, "tenants.$.name": { // the organisation is type: String, },
commenting out black box true results in the error below
tenants.0.tenants.id is not allowed by the schema
Arrays cannot be blackbox, only objects. Try putting blackbox: true
on tenants.$
instead of on tenants
.
I have been struggling to insert objects into an array on the Meteor user document and keep getting errors with my query. I am trying to achieve similar structure as how emails are stored using the accounts package.
ie
below is my schema
and my update query as below
have tried so many different version and keep getting so many errors. This current version give no errors but doesn't insert either. the push part of the query just fails or does nothing.
Im using collection2, simplscema etc
Please help @aldeed