-
-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Description
According to the documentation this code should work to select a node based on an association:
$number = $dm->find('MyProject\Domain\Phonenumber', '/path/to/phone/number');
$user = $dm->getRepository('MyProject\Domain\User')->findOneBy(array('phone' => $number->getUuid()));However, when using this code to get a MenuNode documentation with a specific content object, I get an error:
The code
$dm = $this->get('doctrine_phpcr')->getManager();
$contentUuid = $dm->getPhpcrSession()->getItem('/cms/content/home')->getPropertyValue('jcr:uuid');
$dm->getRepository(MenuNode::class)->findOneBy(['content' => $contentUuid]);The error
Cannot use association property "content" of class "...\MenuNode" as a dynamic operand
The docs seem to be incorrect.
More importantly, I can't find a way to select the node. The QueryBuilder can't help with this either.
Metadata
Metadata
Assignees
Labels
No labels