Open ssteiner opened 3 months ago
I strongly believe that behind the scenes, every document is loaded when calling UpdateMany anyways.
Hmm... I guess I'll have a look. I already tried a local build yesterday when I couldn't run DropCollection
with an active transaction.
I'm implementing Migrations for LiteDb. In other NoSql Dbs, they have an
unset
command, which allows you to clear a property from a document (or a set of documents). Is there something similar with LiteDb?I know I can load all documents from a collection, call
BsonDocument.Remove(propertyName)
to remove a property, then callcollection.Update(doc)
- but that requires loading every document. To add a property / set a property, I can use thecollection.UpdateMany
method with a BsonDocument containing the changes I want to make, so no need to load everything. Is there something like that to remove a property from a list of documents without having to load them all?