I got this warning way too many times, .remove is deprecated, at lease wont be removed on the next big update x)
My question is, what do I use instead to fully remove one entry?
My collection has only one document that is updated often, by removing it entirely and placing a new one in its place, I’m using db.collection.remove({}) but I keep getting a warning, tried using deleteOne but didnt experiment much with it… Straight to the point, what can I use to not be warned?
so I would instead use db.collection.deleteOne({}) to delete that one entry? or must I specify a field for this deleteOne? 'cause its the only entry in the collection…
I hope not to sound lazy, but could you examplify me a working function for removing an entire single present entry(document) in a collection with deleteOne, or deleteMany?
Thank you in advance…
Any base goes, example: 4 fields, one is an array => That’s roughly alike what I have on the .remove warning.