Open daaru00 opened 8 years ago
var Account = vogels.define('Account', {
hashKey : 'email',
// add the timestamp attributes (updatedAt, createdAt)
timestamps : true,
schema : Joi.object({
email : Joi.string().email(),
name : Joi.string(),
age : Joi.number(),
roles : vogels.types.stringSet(),
settings : {
nickname : Joi.string(),
acceptedTerms : Joi.boolean().default(false)
}
}).unknown(true);
});
Or even just Joi.any()
or Joi.object()
Hi, can I declare a schemaless model? If I try to add an attribute that is not in the schema I get an error:
[ValidationError: test1 is not allowed. password test2 not allowed]
I doing something wrong?