Class | Mongoid::Persistence::Operations::Embedded::Insert |
In: |
lib/mongoid/persistence/operations/embedded/insert.rb
|
Parent: | Object |
Insert is a persistence command responsible for taking a document that has not been saved to the database and saving it. This specific class handles the case when the document is embedded in another.
The underlying query resembles the following MongoDB query:
collection.update( { "_id" : 1 }, { "$push" : { "field" : "value" } }, false );