when i want to generate the entity doctrine and zend 2 from two data bases i get this errors:config/autoload/local.php : i have this Error:
Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for doctrine.entitymanager.orm_alternative on line 122:
line 122: i have this $entityManager = $this->getServiceLocator()
->get('doctrine.entitymanager.orm_alternative');
return array(
'doctrine' => array(
'connection' => array(
// default connection name
'orm_default' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'localhost',
'port' => '3306',
'user' => 'root',
'password' => '',
'dbname' => 'data1',
'charset' => 'utf8',
'driverOptions' => array(
1002=>'SET NAMES utf8'
),
),
// Alternative DB connection
'orm_alternative' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'localhost',
'port' => '3306',
'user' => 'root',
'password' => '',
'dbname' => 'data2',
'charset' => 'utf8',
'driverOptions' => array(
1002=>'SET NAMES utf8'
),
),
),
// Entity Manager instantiation settings
'entitymanager' => array(
'orm_default' => array(
'connection' => 'orm_default',
'configuration' => 'orm_default',
),
'orm_alternative' => array(
'connection' => 'orm_alternative',
'configuration' => 'orm_alternative',
),
),
Fatal error: Uncaught exception 'Zend\Stdlib\Exception\BadMethodCallException' with message 'The option "orm_al ternative" does not have a callable "setOrmAlternative" ("setormalternative") setter method which must be defin ed' in C:\wamp\www\mp\vendor\zendframework\zend-servicemanager\src\ServiceManager.php on line 943
and
Zend\ServiceManager\Exception\ServiceNotCreatedException: An abstract factory could not create an instance of d octrine.entitymanager.ormdefault(alias: doctrine.entitymanager.orm_default). in C:\wamp\www\mp\vendor\z endframework\zend-servicemanager\src\ServiceManager.php on line 1132
and
Zend\ServiceManager\Exception\ServiceNotCreatedException: An exception was raised while creating "Router"; no i nstance returned in C:\wamp\www\mp\vendor\zendframework\zend-servicemanager\src\ServiceManager.php on l ine 943
How can I solve this issue?