Inside my UserRepository I want to create custom queries, like the ones I can create with $dm->createQuery('some query') when not using MongoDB.
How can I do this? I see that $this->createQueryBuilder() method exists, but $this->createQuery() does not.
I also tried this as it would make sense, but didn’t work:
$this->createQueryBuilder('u')
->where(array('$or' => array(
array('u.username' => $username),
array('u.email' => $username)
)))
// ...
It says that $or is an invalid operator.
Found it here: Doctrine2 Mongodb adding more $or operator