These are chat archives for Automattic/mongoose

May 2016
Kevin Whitman
May 04 2016 04:57
@vladotesanovic Hmm I don't think there's a offical mongo chat on here, other than the native driver one.
Vlado Tesanovic
May 04 2016 06:44
@keverw np, i am curious about best workflows for my application. One collections vs many...
May 04 2016 06:53
also interested in the answer of that :D
Vlado Tesanovic
May 04 2016 06:55
:) probably there is not single truth to that, but i will go with one collection, because i need transnational / atomic behavior
Maintain update across multiple collection can be pain
May 04 2016 10:19

ey everybody! quick question: I know MongoDB's has a 16mb document size limitation, but can I overcome that limitation using sub-documents? I mean, when not directly embedding the data into one single Model, but rather referencing other Models... I'll have 3 different schemas, but I will always .save() to one of them, which have the other two sub-documents like

var childSchema = new Schema({ name: 'string' });

var parentSchema = new Schema({
children: [childSchema]

(taken from mongoose's docs)

May 04 2016 10:24
This message was deleted
Vlado Tesanovic
May 04 2016 11:19
@PedroMD you can't overcome document limitation with sub document
With embedding, yes
Christoph Werner
May 04 2016 13:48
argh. now i'm having a serious problem.
is there any way in a middleware function that gets schema and options as its arguments, to determine the model name associated with the schema?
i'd like to infer the model name from the schema