These are chat archives for Automattic/mongoose

2nd
May 2017
nacq
@nacq
May 02 2017 00:21
Sup guys, any idea why populate is not working if my ref's _id is type Number? (mongoose v. 4.6.8)
akilesh
@akileshv
May 02 2017 08:21
  ({_id: id},  { $inc: { 'total.$.count: 1 } })
how to make total.$.count this value dynamic
Andrew Pitts
@apitts
May 02 2017 23:09
I'm trying to get to the bottom of an error that Mongoose is occasionally throwing. Any thoughts would be much appreciated! The stack trace is below:
TypeError: this.isSelected is not a function 
    at model.Model.$__version (/app/node_modules/mongoose/lib/model.js:589:13) 
    at model.Model.$__delta (/app/node_modules/mongoose/lib/model.js:511:10) 
    at model.Model.$__handleSave (/app/node_modules/mongoose/lib/model.js:147:22) 
    at model.Model.$__save (/app/node_modules/mongoose/lib/model.js:185:9) 
    at model.Model.save (/app/node_modules/mongoose/lib/model.js:283:15) 
    at model._done (/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:101:24) 
    at _next (/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:64:28) 
    at fnWrapper (/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:8) 
    at model.Object.defineProperty.value.fn (/app/node_modules/mongoose/lib/schema.js:221:11) 
    at _next (/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:62:30) 
    at fnWrapper (/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:8) 
    at /app/node_modules/mongoose/lib/schema.js:196:17 
    at /app/node_modules/mongoose/node_modules/kareem/index.js:127:16 
    at wrapped (/app/node_modules/newrelic/lib/transaction/tracer/index.js:161:28) 
    at nextTickCallbackWith0Args (node.js:420:9) 
    at process._tickDomainCallback [as _tickCallback] (node.js:390:13)