These are chat archives for Automattic/mongoose

9th
Mar 2016
souravhijli
@souravhijli
Mar 09 2016 13:03
Hello All
i am very new in mongoose
i have requirment something like. i have 4 requird field in mongoose schemabut i want to validate only 2 field during save . other field data will be saved during update. hlow can i do that?
can any one help me on this problem? when i am going to save 2 field it return errors with all the required fields in the schema
Seo ji woong
@Seojiwoong
Mar 09 2016 13:18
@souravhijli 'validate' means type validation?
if you so, how about 'mongoose.Schema.Types.Mixed'?
it can use any type
Seo ji woong
@Seojiwoong
Mar 09 2016 13:31
how about use 'required' in schema?
antonioaltamura
@antonioaltamura
Mar 09 2016 15:10
Guys mongoose-extend module is really bugged (for example population doesn't work fine), I have lost a lot of time on that. I still want to use inheritance but I don't want to allow the users to save new "root" models..what's the best pratice? (is it clear??:))
antonioaltamura
@antonioaltamura
Mar 09 2016 17:41
more important: using inherited schemas there is a way to use the wildcard text index (for each schema)?