These are chat archives for Automattic/mongoose

25th
Jun 2018
zhan ishzhanov
@janat08
Jun 25 2018 06:32
is there a way to keep denormalized data fresh with schema/model definitions
meteor has a bunch of frameworks that depend on oplog tailing to watch for writes on parent
zhan ishzhanov
@janat08
Jun 25 2018 08:24
parent of denormolized data
Ben Chiciudean
@benydc
Jun 25 2018 08:43
can I push array to update a document property with one line?
Event.findByIdAndUpdate(eventObjectId, { $push: { products: productObjectIds } });
Ben Chiciudean
@benydc
Jun 25 2018 09:43
how do I create a custom typescript type for Schema?
Kev
@lineus
Jun 25 2018 11:17
@benydc does that $push command not work?
Ben Chiciudean
@benydc
Jun 25 2018 11:18
I don’t know yet, haven’t tested
Kev
@lineus
Jun 25 2018 11:19
I think as long as mongoose can cast the contents of productObjectIds according to the schema path products it should work.
@benydc it works