I am trying to implement mapped inheritance with XML. From the 
documentation:

<discriminator-mapping value="cat" class="MyProject\Cat" />


Do I need to have the class 'Cat' already defined for this mapping to work?

On the implementation that I am working on, I get the error:

"Entity class 'RoleApplicant' used in the discriminator map of class 
'RoleAbstract' does not exist.  " for 

<discriminator-mapping value="applicant" class="RoleApplicant" />.

My current solution for this problem is:

   1. Renaming RoleAbstract.dcm.xml to RoleAbstract.dcm.xml.bak
   2. Generating the entities "orm:generate-entities"
   3. Renaming RoleAbstract.dcm.xml.bak back to orinigal.
   4. Generating entities again
   5. Adding "extends RoleAbstract" to all the relevant classes 
   (orm:generate-entities will not do it for you! strange?)
   6. Using "orm:schema-tool:update --dump-sql"

There would be a better solution to the issue? Any suggestions?

Thank you.
-- Sulabh Bista

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to