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 ?

Member Avatar

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.

@ankit.4aug

I don't understand your question.

Can you post the CodeIgniter code with Doctrine for ORM?

I think it would be much easier to grasp with some php code than actaully describing what you are trying to do.