This bundle implements soft-deletion for Doctrine MongoDB ODM and Symfony2.
[doctrine-odm-softdelete]
git=git://github.com/doctrine/mongodb-odm-softdelete.git
[DoctrineMongoDBSoftDeleteBundle]
git=git://github.com/doctrine/mongodb-odm-softdelete-bundle.git
target=bundles/Doctrine/Bundle/MongoDBSoftDeleteBundle
php bin/vendors install
<?php
// ...
$loader->registerNamespaces(array(
// ...
'Doctrine\\ODM\\MongoDB\\SoftDelete' => __DIR__ . '/../vendor/doctrine-odm-softdelete/lib',
<?php
// ...
$bundles = array(
// ...
new Doctrine\Bundle\MongoDBSoftDeleteBundle\DoctrineMongoDBSoftDeleteBundle(),
Add the following to config.yml
to get started:
doctrine_mongodb_softdelete:
deleted_field_name: deletedAt