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 for LastMitch

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.