I am doing a project to decouple business domain (entities) from persistence mapping, by converting annotations to XML. Doctrine:mapping:convert generally works fine, but I encounter some issues when converting mapped superclass hierarchies, and I am looking for an answer to a related question:
1. The resulting XML mapping gets a table attribute defined in the <mapped-superclass> element (<mapped-superclass name="\Some\Abstract\SuperClass" table="SuperClass" /> This is unexpected because a mapped superclass is a non-entity 2. Field mappings defined in annotations in the superclass are not generated in XML Are those two issues expected behaviour or bugs? If those are bugs I'll be happy to open tickets for them :) The related question I have is what mappings can be defined on the mapped superclass that will be correctly inherited by the concrete subclasses? I have property mappings (@ORM\Column), but also @ORM\UniqueConstraint, @ORM\Index and @ORM\Id annotations. I'd love to be able to define them in the mapped superclass XML as much as possible so they can be inherited by the subclass entities. Suprisingly enough traits with mapped properties seem to be handled correctly: the property mappings appear in the generated XML for the entities using the traits. This seems to be correct under the assumption that traits cannot have their own XML mapping. -- 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/d/optout.
