PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 29th of November, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:57:33] <sekyms> I'm having issues when I have a key value pair made of an array of objects
[00:57:44] <sekyms> the objects are being saved as "[object Object]"
[01:12:38] <sekyms> anyone around?
[17:30:08] <laurensvanpoucke> ok a newbie question. How can I check if a collection has a 'field' ?
[17:30:26] <laurensvanpoucke> with hasOwnProperty ? or with undefined ? or ?
[17:48:55] <wsmoak> laurensvanpoucke: what do you have so far ?
[17:49:08] <laurensvanpoucke> nothing
[17:49:29] <wsmoak> the collection itself doesn’t really have fields… documents do. you can stuff whatever you want in the collection.
[17:49:49] <laurensvanpoucke> i meant document
[17:50:08] <wsmoak> what language are you using?
[17:50:21] <laurensvanpoucke> MEAN stack
[17:50:49] <wsmoak> so… all javascript. okay, let me see…
[17:50:50] <laurensvanpoucke> so just check if a document I created ( a user for example ) has a property
[17:51:00] <laurensvanpoucke> that not has a default value
[17:51:34] <laurensvanpoucke> just retrieve the document and do document.value === undefined ?
[17:53:16] <wsmoak> laurensvanpoucke: http://docs.mongodb.org/manual/reference/operator/query/exists/ looks promising
[17:53:23] <laurensvanpoucke> ok will check in a moment
[17:53:26] <laurensvanpoucke> thnx in regards
[17:55:42] <wsmoak> or are saying the document definitely always has the field, and you just want to see if it has a value ?
[19:18:37] <laurensvanpoucke> @wsmoak ok i'm back, no their is no default value... so I want to check if the value is set or not in the past.
[21:05:30] <sailias> I see random {op: 'remove', query: {foreign_key_id: ObjectId, "_id": {$nin: [ObjectId]}}} in my slow query log
[21:05:39] <sailias> could these be Mongoid transaction rollbacks?
[21:06:05] <sailias> only happens on 1 collection, and can cause massive locking over time
[21:06:27] <sailias> note: I am not issuing the command anywhere