Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I patch all documents of a certain type in RavenDB?

Tags:

ravendb

I've changed my data model and need to change a property of all my objects to null because deserializing them after my model changed throws an exception.

I'm guessing I could issue a patch for every document but I can't find any way to do just that, patching every document of a certain type. I need the Ids.

So I could retrieve a list of Ids for all my documents and then create a patch for every single document using those Ids. But then I'll have to retrieve the Ids without the object being deserialized, because deserialization throws an exception.

Any ideas?

like image 537
LinusK Avatar asked Jun 28 '11 14:06

LinusK


1 Answers

You can patch documents based on an index, see http://ravendb.net/documentation/set-based

like image 192
Thomas Freudenberg Avatar answered Oct 22 '22 18:10

Thomas Freudenberg