ZF2 Doctrine2 setFilterSchemaAssetsExpression setting in the



如何设置

$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;
        }
    ),
),
);

相关内容

  • 没有找到相关文章

最新更新