This package is ment to be a slight variation of the original DoctrineExtensions.
composer install evozon-php/doctrine-extensions
The original SoftDeleteable behavior was to use timestamp column that was either NULL or the date time of deletion.
While some RDBMs can index NULL-able values, some can not (like Oracle). This means it will always do a full table scan.
The modified SoftDeleatable behavior is to use a boolean (true/false) or equivalent numeric (1/0) value to represent the soft deleteable state.
Assuming you are using DoctrineBundle and StofDoctrineExtensionsBundle.
Add the filter to config.yml, or change the original softdeleteable:
orm:
...
entity_managers:
default:
...
filters:
softdeleteable:
class: EvozonPhp\SoftDeleteable\Filter\SoftDeleteableFilter
enabled: true
and add the SoftDeleteableListener to your services.yml:
services:
evozonphp.listener.softdeleteable:
class: EvozonPhp\SoftDeleteable\SoftDeleteableListener
tags:
- { name: doctrine.event_subscriber, connection: default }
calls:
- [ setAnnotationReader, [ "@annotation_reader" ] ]
Thanks to everyone participating in the development of the Doctrine2 extensions!