db4o provides a special API to move classes between namespace, rename classes or fields.
Use the configuration API to rename a class.You need to rename the class before you open the database.
Remember to include the assembly name.
configuration.Common.ObjectClass("Db4oDoc.Code.Strategies.Refactoring.PersonOld, Db4oDoc") .Rename("Db4oDoc.Code.Strategies.Refactoring.PersonNew, Db4oDoc");
configuration.Common.ObjectClass("Db4oDoc.Code.Strategies.Refactoring.PersonOld, Db4oDoc") _ .Rename("Db4oDoc.Code.Strategies.Refactoring.PersonNew, Db4oDoc")
Use the configuration API to rename a field. You need to rename the field before you open the database.
Remember to include the assembly name.
configuration.Common.ObjectClass("Db4oDoc.Code.Strategies.Refactoring.PersonOld, Db4oDoc") .ObjectField("name").Rename("sirname");
configuration.Common.ObjectClass("Db4oDoc.Code.Strategies.Refactoring.PersonOld, Db4oDoc") _ .ObjectField("name").Rename("sirname")
The safe order of actions for renaming is: