0

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?

John F
  • 865
  • 1
  • 8
  • 15

1 Answers1

0

I found the answer while searching under different key words.

Doctrine: Update discriminator for SINGLE_TABLE Inheritance

It appears you need to import a user's data from one object into another.

Community
  • 1
  • 1
John F
  • 865
  • 1
  • 8
  • 15