PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 19th of May, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[20:21:39] <blip99> hi all, I'm new to Mongo and learning aggregations. Need to accomplish the following: Have 2 collections, A and B. Docs in B have an array field called A_ids, basically references to documents in A.
[20:22:19] <blip99> I want to modify A, such that it has a field called B_id, which contains the _id from collection B
[20:23:16] <blip99> Are aggregations the best option for this? Someone suggested I use $project followed by collection.update(), but i'd rather do all in 1 aggregation pipeline without calling .update