PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 6th of April, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:51:56] <bel3atar> in db.customers I have documents with embedded orders {name: 'Bob', age: 21, orders: [....]}. How big can the array be? Does the 16MiB limit apply?
[08:37:21] <FireJ> hmm is there a reason a null record isn't triggering the error condition for findOneAndRemove?
[08:37:25] <FireJ> (mongoose)
[08:38:36] <kali> bel3atar: yes it does
[12:11:02] <ale316> Hi guys, I tried asking this on #mongoosejs already, but there ain't nobody there. When we do something like Photo.find({user: someId}).sort({createdAt: -1}).limit(10) does Mongoose always retrieve ALL photos from specified user and then applies the sort and limit filters?
[13:42:28] <slikts> I'm using mongoose and my project structure for mongo stuff is just this: /models/<modelname>.js
[13:42:36] <slikts> where should I put mongoose plugins then?
[13:42:50] <slikts> I mean, is there a conventional place for plugins
[15:56:15] <careta> hello mongos
[15:56:30] <careta> anyone keen to help a mongo newbie?
[15:57:04] <careta> I need a bit of help using pymongo and nodejs
[15:57:34] <careta> I'm trying to use nodejs on a $where clause in python
[15:57:40] <careta> what do I need to import?
[17:50:25] <kali> careta: what ? nooo !
[17:50:43] <kali> careta: don't use $where. don't use server side javascript
[17:50:49] <kali> i mean mongo side javascript
[17:51:16] <kali> (i'm not sure node.js is a great idea, but this is probably just me)
[17:51:37] <kali> but don't use $where. that's a very bad idea to start with.
[18:04:10] <kaawee> Hello! Does mongodb have a synchronization facility such as LISTEN, NOTIFY in SQL?
[18:07:11] <kali> in SQL ? that's a very non standard extension
[18:07:15] <kali> but it does not
[18:09:02] <_sri> actually it does, capped collections and tailable cursors can be used like that
[18:12:07] <kali> yes, indeed. i thought listen/notify was higher level
[18:17:20] <slikts> anyone know how to pass arguments to subdocument middleware?
[18:17:54] <slikts> I'm passing an argument to the save method for the document, and I need the same argument for the subdocuments as well
[18:21:16] <kaawee> _sri: well, can I use tailable cursors without capped collections? I basically want this: client A expects that a document with { "foo": "12345"} is inserted, and waits for that to happen. client B actually does the insert. now client A should immediately (e.g. preferably within 1 second) know that this has happened, without polling the database)
[18:22:02] <_sri> http://docs.mongodb.org/manual/tutorial/create-tailable-cursor/
[18:27:09] <kaawee> _sri: it basically says that this is not possible
[18:59:40] <snowinferno> Hi all, I'm new to mongo and trying to learn through use. I created a collection with an array as part of it. I added a document to the array using update with $push. When I query the collection, every member of the document is an array. Is this expected behavior?
[21:37:28] <Richhh> possible to append an element to an array value of a document field?
[21:38:13] <Richhh> ah, $addToSet
[21:38:25] <Richhh> or $push
[21:38:49] <Richhh> I guess
[21:40:51] <Richhh> yep, $addToSet I was looking for thanks
[22:39:41] <bchomp> say I have a document with an array of objects in it. those objects have a "foo" attribute. is it possible to do a query where the result is an array of all the values of "foo"?
[23:13:12] <joannac> bchomp: db.coll.find({}, {"array.foo":1})
[23:18:50] <bchomp> joannac: won't that return all the other attributes of the objects in array?
[23:19:18] <joannac> bchomp: did you try it?
[23:22:18] <bchomp> sorry no. i will now. sorry for being bad.