I have three entities Compound, ComponentQuantity, and Component the Compound has a ManyToMany relationship with ComponentQuantity and ComponentQuantity has a ManyToMany relationship with Component.
I need to get the Compound‘s which ComponentQuantity are related with a Component,
If I would need the component quantity I would use:
$qb = $this->createQueryBuilder("c")
->where(':componentQuantity MEMBER OF c.componentQuantities')
->setParameters(array('componentQuantity' => $componentQuantity));
but I need something like
$qb = $this->createQueryBuilder("c")
->where(':component MEMBER OF c.componentQuantities.components')
->setParameters(array('component' => $component));
but this not work.