Hey Guys, In one application I have a Page entity, which has a start- and an enddate. I'd like a central spot to define that only pages with a start date in the past and a end date in the future (or with no end date) can be retrieved.
Pretty soon I found out that a filter<http://docs.doctrine-project.org/en/latest/reference/filters.html>is an awesome way to achieve this. But a filter is (intentionally?) limited in what it can achieve. There are ideally two things that I need for my use case - To use the database platform, so I can use *getNowExpression* and *getIsNullExpression*. - To have some way of allowing entities to subscribe to my filter (In the future our "product" entity should also be able to use the same filter. The Gedmo SoftDeleteable Filter already solves this problem, but it uses reflection and generally feels like the wrong way to do this: https://github.com/l3pp4rd/DoctrineExtensions/blob/master/lib/Gedmo/SoftDeleteable/Filter/SoftDeleteableFilter.php What is the best way to create such a filter? The SQLFilter<https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/Filter/SQLFilter.php>already has access to the entity manager, could we create a protected getEntityManager()? Regards, Nico Schoenmaker -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/groups/opt_out.
