I have two modules. 1) User Module and 2) RbacUser Module. RbacUser Module is depended on User Module. I extend my "User entity" from User Module in RbacUser Module and add some new attributes to User Entity like roles etc.
What i am to do is, When i used RbacUser Module, make RbacUser Module User Entity default. So schema tool know that which entity should use to create table ?
In Short Words:
if Only User Module is used then make its User Entity Default
or
if RbacUser Module is used then make its User Entity Default and ignore User's entity.
I found the solution
These are the configuration of my both modules
User Module Config file
User\Config\module.config.php
'driver' => array(
'user_driver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'cache' => 'array',
'paths' => array(
__DIR__.'/../src/User/Entity',
),
),
'orm_default' => array(
'drivers' => array(
'User\Entity\User' => 'user_driver'
)
)
),
RbacUser Module config file
RbacUser\Config\module.config.php
'doctrine' => array(
'driver' => array(
'rbacuser_driver' => array(
'class' => 'Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver',
'cache' => 'array',
'paths' => array(
__DIR__.'/../src/RbacUser/Entity',
),
),
'orm_default' => array(
'drivers' => array(
'RbacUser\Entity\User' => 'rbacuser_driver'
)
)
)
)
If i don't use "User" Module doctrine driver config then my problem is solved. Is their any way to check if RbacUser Module is used then don't use doctrine driver configuration in "User" Module