Hello, I have carefully read the doctrine manual at http://docs.doctrine-project.org/en/2.0.x/reference/inheritance-mapping.html, and thought that the mapped super class is the way to go for my use case. If i get the first note right, Doctrine should able to resolve links to the mapped superclass to its only derived class (at least if there is only one).
So I decided to create two bundles (I use doctrine in combination with symfony), whereby I have an "abstract" base bundle, containing the most general part of my entity, and several "deriving" bundles, which add some fields more depending on the bundle's use case. In the abstract Bundle I define some many-to-one relations, which I would also like to be able to query in both directions (I am not sure if that works like expected, because the note in the documentation is a bit confusing there). On the other sides of this relations I define a one-to-many relation, with the mapped super class as the target entity. You can have a look at this setup on github, the Product<https://github.com/sulu-cmf/SuluProductBaseBundle/blob/develop/Resources/config/doctrine/Product.orm.xml> is the mapped super class, and I have defined an AdvancedProduct<https://github.com/sulu-cmf/SuluProductAdvancedBundle/blob/feature/product-rest-services/Resources/config/doctrine/AdvancedProduct.orm.xml>, which should inherit the other fields of the Product. Now I have defined some entities more, e.g. a Type<https://github.com/sulu-cmf/SuluProductBaseBundle/blob/develop/Resources/config/doctrine/Type.orm.xml> for a product. There I have the one-to-many relationship back to the product, which seems to make trouble. I always get sql errors, describing that there is no product-table. After some debugging I found out that it tries to resolve the mapped superclass Product, which results to this table name, which is not existent (of course). Where is the problem here? Is it not intended to use the mapped super class like this? Or do I have a configuration error? Thanks in Advance for your Help. -- 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.
