These are chat archives for Automattic/mongoose

1st
May 2018
Nate Mallison
@NJM8
May 01 2018 01:16
Have you looked into populate?
panigrah
@panigrah
May 01 2018 01:40
Populate is easy, filtering is hard - that’s what I need help with
Don Schrimsher
@donald-s
May 01 2018 20:54
Hey. What's the best way to filter out fields that aren't defined in the schema when performing a bulk update (via Model.bulkWrite)? I'm trying to prevent any fields that aren't defined in the schema from being saved to the database.
I see that you can use insertMany to do this when inserting documents, but I don't see any way to do it when bulk updating.