Let's say I have an object FireNinja < Ninjain my database that is stored using unidirectional inheritance. Later I understand that he really is WaterNinja < Ninja. What is the cleanest way to change it to another subclass? Even better, I would like to create a new object WaterNinjaand just replace the old one FireNinjain the database, saving the identifier.
Edit
I know how to create a new object WaterNinjafrom my existing one FireNinja, and I also know that I can delete the old one and save the new one. What I would like to do is change the class of an existing element. I do this by creating a new object and doing ActiveRecord magic to replace the string or doing some crazy thing for the object itself or even deleting it and reinserting it with the same identifier, although this is part of the question.
user24359
source
share