It's possible to simply filter retrieved Documents by using:
$dm->findBy(array('field' => 'value'))
But I need something a bit more suited to Content Repository specifics. So, is there a way to retrieve Documents (e.g. equivalent to "SELECT ... WHERE ..."), filtered by:
?
It seems there is (yet?) not available API for the exact solution as mentioned. PHPCR (not ODM) have the features which in a certain way may make these tasks done, though.
The above tasks can be acheived by:
Filtering simply by a multiple-valued field. E.g. if you have "authors" field as an array, the PHPCR seems to correctly sort and filter document by first author available; furtherore in PHPCR (again, not ODM) API there's an equivalent to in_array() PHP function. It's treated as any other (not multivalued) field - http://doctrine-phpcr-odm.readthedocs.org/en/latest/reference/query-builder-reference.html#literal
With filtering by a path, there are three possibilities (the one I mentioned as needed is the third one):
For more, here are docs available: http://doctrine-phpcr-odm.readthedocs.org/en/latest/reference/query-builder.html and http://doctrine-phpcr-odm.readthedocs.org/en/latest/reference/query-builder-reference.html