I keep getting this error:
/* ... */
$em = $this->getDoctrine()->getEntityManager();
$movie = $em->getRepository('MyMyBundle:Movie')->findMovieByName('moviename'); // Repository Class
\Doctrine\Common\Util\Debug::dump($movie); // dumps the object just fine! The Repository found it
echo $movie->getId(); // brings me the error nevertheless
Fatal error: Call to a member function getId() on a non-object in ... on line ...
I have the getId() method in my Entity. Other methods also don't work even though it is and object!
The object gets dumped like:
..... array(1) { [0]=> object(stdClass)#759 (59) { ["__CLASS__"]=> string( .....
Any hints?