In a Symfony2 application, I have a MainBundle and various bundles that you can enable or not. In MainBundle, I need to have a Model and a basic Entity . In OtherBundle Entity with the same table name as Entity in MainBundle .
The luminaires in the MainBundle must be loaded with or without other bundles than the MainBundle:
MainBundle - Model - Entity (Table name "test") - Fixtures OtherBundle - Entity (Table name "test") - Fixtures OtherBundle2 - Entity (Table name="test") - Fixtures
If I used @ORM \ MappedSuperclass for Model , @ORM \ Entity for Entity > in MainBundle and @ORM \ Entity in OtherBundle , after which Doctrine2 stops with an error, "the table already exists."
I cannot use the Inheritance table, since my model should not know about other objects in other packages. The @ORM \ DiscriminatorMap icon points to OtherBundle .
Is there any way to do this?
source share