[11:37:12] <kurushiyama> yopp: BS. You screwed your data model, do not blame it on MongoDB
[11:38:37] <yopp> BS is that in your case you have to _manually_ maintain uniqueness of the events
[11:39:03] <yopp> so you need to read and then write back on application level. with eventId as a key you don't need that.
[11:39:17] <yopp> plus, you don't need to store extra field, which is pricy in my case
[11:39:44] <kurushiyama> yopp: I do not know how to explain it different. If in doubt, you are of course right, which was why you asked for help in the first place.
[11:42:16] <yopp> anyway, that's a not a big deal, I can denormalize data and store ids in separate field or even collection. My fight is to keep the record footprint as small as possible, as mongo can efficiently deal with billions of small records. Overhead is just too big.
[15:10:00] <Ryzzan> how to populate and then aggregate ($group) population result (is it possible?)... anyone
[15:48:33] <jr3> If I'm updating a numeric field in a document is there an advantage of using
[15:49:00] <jr3> $inc over say an replacing the field within the update
[16:24:00] <cheeser> jr3: consecutive updates wouldn't overwrite eac other with $inc
[16:56:18] <palaska> hey all, is anyone available? got a question
[16:57:01] <kurushiyama> Don't ask to ask, just ask. If you are lucky, you'll get an answer ;)
[19:06:22] <Yatekii> when I have let's say a mailbox and some mails belonging to it. would you do a key on the mailbox object which holds a list of all mail objects or would you do a separate collection for the mails?
[19:07:13] <Yatekii> what would you use a subobject for?
[19:08:43] <kurushiyama> Yatekii: Good question. I have hardly ever needed one. Much less an array of subdocs. I can give you an artificial example, though: http://blog.mahlberg.io/blog/2015/11/05/data-modelling-for-mongodb/#why-would-one-use-embedding
[19:10:32] <kurushiyama> Yatekii: As per your use case, I'd have an additional field named folder, which would be a materialized path by definition. with the recipients email and the path, you should be good.
[19:16:03] <Yatekii> another question: how would you delete an object that has no name, id and nothing like that except for an attribute thats a huge list of other objects?
[19:16:26] <Yatekii> (I accidentially have a nameless object because I didn't know that I have to specifiy EVERYTHING in the update query)
[19:17:40] <kurushiyama> Yatekii: I'd probably use an aggregation to find the docs with the highest number of elements for said attribute.
[21:50:12] <Ryzzan> then i would like to get data (populate) from "SomeCollection" (_creator would work as a foreign key) using a valur to related to this other collection
[21:50:38] <kurushiyama> Ryzzan: The problem with Mongoose is that it forces you to see MongoDB as an SQLish or document store. Neither could be farer from the truth
[21:50:56] <kurushiyama> Ryzzan: Plus: You basically abstract away all advantages MongoDB has.
[21:54:16] <Ryzzan> let's say i have a Collection to "movies"
[21:54:19] <kurushiyama> Ryzzan: It is conceptually problematic, to say the least, and StephenLynx can tell you some details about performance. populate basically is a good way to keep you from proper data modelling, further decreasing performance. Try it over a sharded cluster. It wreaks havox on UX.
[21:54:22] <StephenLynx> if your data is highly relational, don`t use mongo.