1

I have a question regarding RavenDb:

Let's say I already store a collection of objects of type Foo and now make a change to the class Foo, let's say, remove a property. How can this change be reflected in the existing database? Or do I need to read all stored instances of old Foos, map them manually to the new Foo and then upload to the database again?

Any advice how to best handle this type of scenario? I am interested in RavenDB but am mainly concerned about difficulties in wanting to extend a specific class and then wanting to have this change reflected in the document in the db.

Thanks

shahkalpesh
  • 33,172
  • 3
  • 63
  • 88
Matt
  • 7,004
  • 11
  • 71
  • 117

1 Answers1

0

For most changes, you don't need to do anything, you can just let RavenDB fix things for you when it next load the object. For example, when you add a new property, or remove a property. For more complex stuff, you can run a script (http://ayende.com/blog/157185/awesome-ravendb-feature-of-the-day-evil-patching) that would convert the existing docs from one version to the other).

Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41