l3pp4rd/DoctrineExtensions — pull request #805 by sprain (2013-08-14 14:49:50+00:00)
Title: Prototype: Making softdeletable time aware

This is a prototype of an idea. I wonder what you guys think about.

I have a case where it would be very helpful to set a deleted time already at the creation of an entity, because there is a clearly defined expiration date. If the softdeletable extension would actually check for the value of the delete timestamp and not just for it being `null` this could be achieved without having to build a "clean up script".

In my prototype the entity can be configured to be time aware like this:

/**
* @ORM\Table(name="MyEntries")
* @ORM\Entity
* @Gedmo\SoftDeleteable(fieldName="deleted", timeAware=true)
*/
class Entry
{
…
}

if `timeAware == true` a entity with a deleted time in the future would still be found.

What do you think?