1 | initial version |
To use Doctrine ODM query to search for documents, you can follow these steps:
$qb = $dm->createQueryBuilder('AppBundle:Document');
$qb->field('createdBy')->equals($userId);
>
, <
, or in
:$qb->field('createdDate')->lt($someDate)->field('status')->in(['draft', 'pending']);
$documents = $qb->getQuery()->execute();
This will give you an array of documents that match your query criteria. You can iterate over this array and perform any additional actions on each document as needed.