如何设置
$config->setFilterSchemaAssetsExpression($regexp);
在我的ZF2
配置中?
我不想做一个--complete
并在数据库中kill
我的其他表。
'doctrine' => array(
'configuration' => array(
'orm_default' => array(
'numeric_functions' => array(
'COS' => 'DoctrineExtensionsQueryMysqlCos',
),
'types' => array(
'Point' => 'CrEOFSpatialDBALTypesGeometryPointType',
),
),
),
'eventmanager' => array(
'orm_default' => array(
'subscribers' => array(
'GedmoTimestampableTimestampableListener',
),
),
),
),
在全局配置中重新定义 ORM ConfigurationFactory。
use DoctrineORMModuleServiceConfigurationFactory as DoctrineConfigurationFactory;
use ZendServiceManagerServiceLocatorInterface;
return array(
'service_manager' => array(
'factories' => array(
'doctrine.configuration.orm_default' => function(ServiceLocatorInterface $serviceLocator) {
$factory = new DoctrineConfigurationFactory('orm_default');
/**
* @var DoctrineDBALConfiguration $config
*/
$config = $factory->createService($serviceLocator);
$config->setFilterSchemaAssetsExpression('');
return $config;
}
),
),
);