I'm updating a system which uses Doctrine2. It has a User class hierarchy which uses single table inheritance. Employee is the base class which is inherited by Department Admin and Company Admin.
I'm trying to provide a way to promote/demote an employee, which would effectively recast the user from Employee to Department Admin or vice versa. Is there a simple way of doing this? Will I have to create a new instance of the role being promoted to and import all the existing entity data into this? Does Doctrine support recasting entities?