Learn MongoDB 4.x by Doug Bierer

Learn MongoDB 4.x by Doug Bierer

Author:Doug Bierer
Language: eng
Format: mobi, epub
Tags: COM084010 - COMPUTERS / Desktop Applications / Databases, COM062000 - COMPUTERS / Data Modeling and Design, COM018000 - COMPUTERS / Data Processing
Publisher: Packt Publishing
Published: 2020-09-11T06:31:12+00:00


Updating the database

The last piece of the puzzle is to define a method in the property domain service class that accepts form data and updates the database. Because we are adding room types to an embedded list within a document in the properties collection, the database operation we need to perform is not an insert, but rather an update.

MongoDB update operators

MongoDB update operators (https://docs.mongodb.com/manual/reference/operator/update/#update-operators) are needed in order to effect changes when performing an update. Update operators are categorized according to what element they affect: fields, arrays, modifiers, and bitwise.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.