You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
It seems there's no way using the query builder to do an update replacing all the fields so new object completely replaces the old document. It will just update the properties contained in the array passed to the update function leaving properties in the document that aren't in the array intact.
Hello,
It seems there's no way using the query builder to do an update replacing all the fields so new object completely replaces the old document. It will just update the properties contained in the array passed to the update function leaving properties in the document that aren't in the array intact.
DB::connection('mongodb')
->collection($this->collectionName)
->where('_id', $id)
->update($insertArr)
http://docs.mongodb.org/manual/reference/method/db.collection.update/#example-update-replace-fields
Is there another way to do this using this lib or is this something that can be added in?
The text was updated successfully, but these errors were encountered: