These are chat archives for Automattic/mongoose

15th
Nov 2017
Paul "Joey" Clark
@joeytwiddle
Nov 15 2017 10:49
@johnslay How about using a pre-save middleare (or perhaps a validate middleware) accepting a next function.
You can read the documents data from this.get(‘field’), do DB lookups, and then decide whether or not tp ass an error to next(). (a possible example)
Michael Ney
@MichaelNey
Nov 15 2017 11:49
https://pastebin.com/5cFPWEVf Hey everyone. I'm having an issue with populating something on a GET request. Might I have some support? Thank's in advance.
Michael Ney
@MichaelNey
Nov 15 2017 12:08
I've changed it around a lot, but still no luck. All help is very much appreciated!
Michael Ney
@MichaelNey
Nov 15 2017 12:27
I've also changed it to specify the field I want to populate which was "songs", but literally nothing gets put into the field when it's sent to the user.
Karthi
@Karthi-SRV
Nov 15 2017 19:14
hi
return Conversation.aggregate([
{
$match: {'chatbotId': chatbotId}
},
{$sort: {"createdAt": -1} } ,
{$skip: skip},
{$limit: 10},
]
tells - aggregation result exceeds maximum document size
shall i know why?