These are chat archives for Automattic/mongoose

25th
Nov 2015
Abel Wang
@aboutabel
Nov 25 2015 06:28
hey guys, my app currently breaks if my schema module doesn't require my config.js module (this is where I actually connect to Mongo). The schema module doesn't even use the module, which is confusing me. I declare var db = require('
  • I declare var db = require('./config') but never even use it again in the schema module
Stephan Kristyn
@nottinhill
Nov 25 2015 10:29
Hi I have this interesting problem
I am using a forEach in node/express
in which I push variables into an array and save in each forEach via Mongoose
now I would have expected to have either 1.) only the whole array in Mongo
2.) have n*(n+1) items
but we are seeing, e.g. for 4 forEach iterations
four entries in mongo, with the full array (n) , quadrupled
any ideas?
why this is
Andy
@Kylia669
Nov 25 2015 12:44
hey, I am trying insert duplicated entity in concurrent threads but ( with same unique and index field ) - it inserts record and override existing one ? - any suggestions?
James Lee
@uptownhr
Nov 25 2015 17:39
do you have drop: true defined?
nschurmann
@nschurmann
Nov 25 2015 18:03
sup guys!, how can i get the enum validation of a schema from the database?
southwestking
@southwestking
Nov 25 2015 21:15
hello