I have a User entity that have sectors associated (such as sector A,B,C and so on)
(Sector is an entity too)
Then I have a Document entity that have sectors associated too
I want to retrieve all Documents where its sectors are in the User entity...
How to do that with doctrine?
$repo = $this->getDoctrine()->getRepository('MyBundle:Document');
$sectors = $this->getUser()->getSectors();
$repo->findBy(['sectors'=>???]);