These are chat archives for Automattic/mongoose

20th
May 2019
hillct
@hillct
May 20 20:14
Good afternoon. I’m trying to understand how to push data to two collections in a single transaction, for example User and Tweet schemas, where the user data grabbed out of an object that looks like this https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object and inserted into a Users collection, linked by reference. Can that be performed in a single operation? Would it be done using pre-ubmit, to push the user data, or is there a better approach?