I am developing an application in CodeIgniter with Doctrine for ORM.
In my doctrine model, I have classes which are inhereted something like this
One abstract SuperClass ( let's call it Super ) and two base classes BaseA and BaseB.
@InheritanceType("JOINED")
@DiscriminatorColumn(name="type", type="string")
@DiscriminatorMap( {"a" = "DerivedA", "b" = "DeriveddB"} )
Now I have an object of DerivedA which i fetch from the database. I want to remove this object from DerivedA and create an object in DerivedB with the same ID as was being used in the SuperClass. This is triggered on a certain event by the user.
How can i achieve the same in Doctrine ?