Mongoid Batch Update/Upsert Alternative?
I know that Mongoid v3+ supports batch inserts via Model.collection.insert() . However, I don't think it supports batch updates where the attributes differ for each record (so I don't think update_all would work either). Is there a way to do batch update/upsert instead of a single-record lookup & update? Here's a simplified example in which I have 2 models: class Product ... has_and_belongs_to_many :lists end class List ... has_and_belongs_to_many :products end When a new Product is created, I associate it with one or more Lists . However, I also need to update the Product attributes daily