I'm fetching data with a many-to-many relationship and I want to define acustom method. Is it possible (and how) to use something like:
$hotel = $entityManager->getRepository('Hotels')->findOneById(1);
$types = $hotel->getTypes(); //$types is instance of **Doctrine\ORM\PersistentCollection**
$types->myCustomFunction(); //do something
It seems to be not implemented already.
See this Doctrine's JIRA issue : http://www.doctrine-project.org/jira/browse/DDC-547