3

我正在使用doctrine2设置symfony2,并且我想使用我遵循的每一步的DoctrineExtensions(Gedmo),并且大多数都在工作,但是我找不到需要更改SoftDeleteable才能工作的配置文件。

https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/softdeleteable.md

$config = 新教义\ORM\配置;

// 你的配置..

$config->addFilter('soft-deleteable', 'Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter');
4

2 回答 2

2

我自己遇到了这个问题并通过将以下内容添加到我的 config.yml 来修复它

doctrine:
    ...
    orm:
        ...
        filters:
            softdeleteable:
                class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
                enabled: true
于 2015-08-21T13:43:55.797 回答
0

I believe the problem is that you're using symfony 2.0 which includes doctrine 2.1. The version of the DoctrineExtensions you're looking at doesn't support doctrine 2.1.

If you flick to the doctrine2.1.x branch in github it doesn't mention softdeletable unfortunately.

于 2012-06-01T10:38:19.800 回答