doeas anybody use the Query\Builder from Doctrine as Standalone Tool ?
It seems like The Query Manager needs a defined Class of the requested Document in MongoDB.
If you have a defined Class like:
<?php
namespace Documents;
/** @Document */
class User
{
// ...
/** @Field(type="string") */
private $username;
}
Then you can do the following:
<?php
$user = $dm->createQueryBuilder('User')
->field('username')->equals('jwage')
->getQuery()
->getSingleResult();
Is there a way to do use the Query\Builder without defining the Document Classes ?
Thanks in advance for any help.