Hi, Is it possible to rename an Entity? If so what would the procedure. Of course I will like to preserve data and schema integrity. Thank you, Richard |
Hello Richard. Yes, it is possible. You can use RecycledAttribute for new Entity and specify old full name of Entity. For example, you have old entity
And you rename SomeOldEntity with SomeNewEntity
It is simplest way to rename some enity. And you should build domain in Preform or PerformeSafely upgrade mode.
Another one way to change model its implement your own Upgrade handler. Upgrade handler is class responsible for upgrade of persistent classes from one assembly. It must be inherited from UpgradeHandler or implement IUpgradeHandler interface, it also must have a parameterless constructor. Each assembly with persistent model should contain exactly one upgrade handler class, it will be automatically found when schema is being upgraded. UpgradeHandler class contains a set of methods and properties that can be overridden for customizing schema upgrade process. For example,
You should read documentation about upgrade for DO-4.6 and for DO-5.0 Beta. |