I have the follow problem with nested finding of collection element:
class User
{
/*
* @MongoDB\Id(strategy="auto")
*/
protected $id;
}
class Network
{
/*
* @MongoDB\ReferenceOne(targetDocument="User")
*/
protected $owner;
}
class Connection
{
/*
* @MongoDB\ReferenceOne(targetDocument="Network")
*/
protected $network;
}
How I can find all user own network connections (by user id) in Doctrine ODM Query builder? P.S. Native mongodb query will accept too.